From: Laszlo Papp Date: Mon, 14 Mar 2011 12:58:16 +0000 (+0200) Subject: Fix a potential resource leak X-Git-Tag: fuse_2_9_0~65 X-Git-Url: http://git.maquefel.me/?a=commitdiff_plain;h=2621a3a467fa97df775d3b6718908bd2631865c5;p=qemu-gpiodev%2Flibfuse.git Fix a potential resource leak --- diff --git a/lib/fuse.c b/lib/fuse.c index 9115af7..0bb63f0 100644 --- a/lib/fuse.c +++ b/lib/fuse.c @@ -1071,9 +1071,11 @@ static int try_get_path2(struct fuse *f, fuse_ino_t nodeid1, const char *name1, err = try_get_path(f, nodeid1, name1, path1, wnode1, ticket); if (!err) { err = try_get_path(f, nodeid2, name2, path2, wnode2, ticket); - if (err) + if (err) { unlock_path(f, nodeid1, wnode1 ? *wnode1 : NULL, NULL, ticket); + free(path1); + } } return err; }