repositories
/
deb_libnfs.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
e94d5a7
)
nfs_opendir_cb: plug potential memory leak
author
Arne Redlich
<arne.redlich@googlemail.com>
Mon, 17 Feb 2014 21:44:47 +0000
(22:44 +0100)
committer
Ronnie Sahlberg
<ronniesahlberg@gmail.com>
Thu, 20 Feb 2014 02:45:33 +0000
(18:45 -0800)
Spotted by clang analyzer.
Signed-off-by: Arne Redlich <arne.redlich@googlemail.com>
lib/libnfs.c
patch
|
blob
|
blame
|
history
diff --git
a/lib/libnfs.c
b/lib/libnfs.c
index 572cd7818a6839d771367019b30dea8ab530c893..61cb29f6c1cc8f3eaf575aabb098f2fd89916020 100644
(file)
--- a/
lib/libnfs.c
+++ b/
lib/libnfs.c
@@
-2876,6
+2876,7
@@
static void nfs_opendir_cb(struct rpc_context *rpc, int status, void *command_da
nfsdirent->name = strdup(entry->name);
if (nfsdirent->name == NULL) {
data->cb(-ENOMEM, nfs, "Failed to allocate dirent->name", data->private_data);
+ free(nfsdirent);
nfs_free_nfsdir(nfsdir);
data->continue_data = NULL;
free_nfs_cb_data(data);