derekf pushed a commit to branch master.

http://git.enlightenment.org/core/efl.git/commit/?id=8b87cd9e465fbae14d47c145c588d500d6401f68

commit 8b87cd9e465fbae14d47c145c588d500d6401f68
Author: Derek Foreman <[email protected]>
Date:   Tue Jul 26 12:22:36 2016 -0500

    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.
---
 src/modules/evas/engines/wayland_shm/evas_shm.c | 6 ++++--
 1 file 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 92aae08..492f6be 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)

-- 


Reply via email to