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:
feb2fc2
)
nfs_creat_async: plug potential memleak
author
Arne Redlich
<arne.redlich@googlemail.com>
Mon, 17 Feb 2014 22:11:59 +0000
(23:11 +0100)
committer
Ronnie Sahlberg
<ronniesahlberg@gmail.com>
Thu, 20 Feb 2014 02:47:27 +0000
(18:47 -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 64f7fe4b23f7ddb8fdd49b28bb511fe2969638e4..969721e0330909f45e1906afba418d7b9c057c7e 100644
(file)
--- a/
lib/libnfs.c
+++ b/
lib/libnfs.c
@@
-2371,6
+2371,7
@@
int nfs_creat_async(struct nfs_context *nfs, const char *path, int mode, nfs_cb
ptr = strrchr(new_path, '/');
if (ptr == NULL) {
rpc_set_error(nfs->rpc, "Invalid path %s", path);
+ free(new_path);
return -1;
}
*ptr = 0;