noice

small file browser
git clone git://git.2f30.org/noice.git
Log | Files | Refs | README | LICENSE

commit 35f3b250bb1e218a46da9e6287f31fb5aeaa3f62
parent 6d04c5329e57a7305dea779f599743ccab9fd9a4
Author: sin <sin@2f30.org>
Date:   Wed, 22 Oct 2014 15:05:14 +0100

Only free() after xstrdup()

Diffstat:
noice.c | 3+--
1 file changed, 1 insertion(+), 2 deletions(-)

diff --git 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; }