diff options
author | Derek Foreman <derekf@osg.samsung.com> | 2016-07-26 12:22:36 -0500 |
---|---|---|
committer | Derek Foreman <derekf@osg.samsung.com> | 2016-07-26 12:38:24 -0500 |
commit | 8b87cd9e465fbae14d47c145c588d500d6401f68 (patch) | |
tree | d35572b27152161e6354cc8e4923c75582953f9f | |
parent | ed55b1f733599f82d3b820d926546e0586731184 (diff) | |
download | efl-8b87cd9e465fbae14d47c145c588d500d6401f68.tar.gz |
wayland_shm: Use correct filename in unlink
We switched from mkstemp to eina_file_mkstemp() but ended up unlinking
the template filename, which didn't exist on the filesystem.
-rw-r--r-- | src/modules/evas/engines/wayland_shm/evas_shm.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/modules/evas/engines/wayland_shm/evas_shm.c b/src/modules/evas/engines/wayland_shm/evas_shm.c index 92aae08444..492f6be509 100644 --- a/src/modules/evas/engines/wayland_shm/evas_shm.c +++ b/src/modules/evas/engines/wayland_shm/evas_shm.c @@ -86,6 +86,7 @@ _shm_pool_make(struct wl_shm *shm, int size, void **data) const char *path; char *name; int fd = 0; + Eina_Tmpstr *fullname; LOGFN(__FILE__, __LINE__, __FUNCTION__); @@ -108,7 +109,7 @@ _shm_pool_make(struct wl_shm *shm, int size, void **data) strcat(name, tmp); - fd = eina_file_mkstemp(name, NULL); + fd = eina_file_mkstemp(name, &fullname); if (fd < 0) /* try to create tmp file */ /* if ((fd = mkstemp(name)) < 0) */ @@ -118,8 +119,9 @@ _shm_pool_make(struct wl_shm *shm, int size, void **data) return NULL; } - unlink(name); + unlink(fullname); free(name); + eina_tmpstr_del(fullname); /* try to truncate file to size */ if (ftruncate(fd, size) < 0) |