evas loader - don't stat NULL file paths
authorCarsten Haitzler (Rasterman) <raster@rasterman.com>
Mon, 2 Jan 2017 13:58:24 +0000 (22:58 +0900)
committerCarsten Haitzler (Rasterman) <raster@rasterman.com>
Mon, 2 Jan 2017 13:58:24 +0000 (22:58 +0900)
something i found valgrinding my recent async improvments. statting
null path. fix it.

src/lib/evas/common/evas_image_load.c

index f51ab01309f38a1b3ca576c8e0923ecbffeb219e..8e59bdd4b54525cbca4a084cf1a649c74a13170d 100644 (file)
@@ -457,7 +457,8 @@ end:
      }
    if (!ie->f) return EVAS_LOAD_ERROR_DOES_NOT_EXIST;
 
-   if (stat(ie->file, &st) == 0) _timestamp_build(&(ie->tstamp), &st);
+   if ((ie->file) && (stat(ie->file, &st) == 0))
+     _timestamp_build(&(ie->tstamp), &st);
 
    memset(&property, 0, sizeof (property));
    property.w = ie->w;