summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarcel Hollerbach <marcel-hollerbach@t-online.de>2017-03-18 22:06:30 +0100
committerMarcel Hollerbach <marcel-hollerbach@t-online.de>2017-03-18 22:10:43 +0100
commit12d01c12591454f4d32901a0c9edcb8d799270f4 (patch)
tree356ff4dabb39595220197aa5e63a5e7888dee4a1
parent7b687c1a255f19e0d682cf57965eaaf8706facc5 (diff)
eina_debug: do not leak a spinlock when the path is not given
-rw-r--r--src/lib/eina/eina_debug_bt_file.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/lib/eina/eina_debug_bt_file.c b/src/lib/eina/eina_debug_bt_file.c
index 59c87d8f19..66636e3567 100644
--- a/src/lib/eina/eina_debug_bt_file.c
+++ b/src/lib/eina/eina_debug_bt_file.c
@@ -104,7 +104,11 @@ _eina_debug_file_get(const char *fname)
104 const char *p; 104 const char *p;
105 const char *pathstr = getenv("PATH"); 105 const char *pathstr = getenv("PATH");
106 106
107 if (!pathstr) return NULL; 107 if (!pathstr)
108 {
109 eina_spinlock_release(&_eina_debug_lock);
110 return NULL;
111 }
108 // dup the entire env as we will rpelace : with 0 bytes to break str 112 // dup the entire env as we will rpelace : with 0 bytes to break str
109 pathstrs = _eina_debug_chunk_strdup(pathstr); 113 pathstrs = _eina_debug_chunk_strdup(pathstr);
110 for (n = 0, p = pathstr; *p;) 114 for (n = 0, p = pathstr; *p;)