projects
/
nnn.git
/ commitdiff
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
6d04c53
)
Only free() after xstrdup()
author
sin <sin@2f30.org>
Wed, 22 Oct 2014 14:05:14 +0000 (15:05 +0100)
committer
sin <sin@2f30.org>
Wed, 22 Oct 2014 14:05:14 +0000 (15:05 +0100)
noice.c
patch
|
blob
|
history
diff --git
a/noice.c
b/noice.c
index e804e686e188a26250e2158a1eadabf79f3d0626..37cc91db3fbfb9b96fe73f44a5271a78b09980d4 100644
(file)
--- a/
noice.c
+++ b/
noice.c
@@
-128,12
+128,11
@@
xdirname(const char *path)
* original string if we lose track of it. */
tmp = xstrdup(path);
p = dirname(tmp);
- free(tmp);
if (p == NULL)
printerr(1, "dirname");
-
/* Make sure this is a malloc(3)-ed string */
p = xstrdup(p);
+ free(tmp);
return p;
}