summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSteve Dickson <steved@redhat.com>2019-04-25 10:53:39 -0400
committerSteve Dickson <steved@redhat.com>2019-04-28 13:26:00 -0400
commitc964b77a532a5f531e5c8699bdbb877385bea587 (patch)
treeb22c114d1c761508092c971ca110a3bbf020e525
parent6cdc29f6e2bb33637ee8e184449cb0482719e083 (diff)
downloadnfs-utils-c964b77a532a5f531e5c8699bdbb877385bea587.tar.gz
Removed resource leaks from nfs/exports.c
nfs/exports.c:717: leaked_storage: Variable "id" going out of scope leaks the storage it points to. nfs/exports.c:727: leaked_storage: Variable "id" going out of scope leaks the storage it points to. Signed-off-by: Steve Dickson <steved@redhat.com>
-rw-r--r--support/nfs/exports.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/support/nfs/exports.c b/support/nfs/exports.c
index b59d187..5f4cb95 100644
--- a/support/nfs/exports.c
+++ b/support/nfs/exports.c
@@ -714,6 +714,7 @@ parsesquash(char *list, int **idp, int *lenp, char **ep)
}
if (id0 == -1 || id1 == -1) {
syntaxerr("uid/gid -1 not permitted");
+ xfree(id);
return -1;
}
if ((len % 8) == 0)
@@ -724,6 +725,7 @@ parsesquash(char *list, int **idp, int *lenp, char **ep)
break;
if (*cp != ',') {
syntaxerr("bad uid/gid list");
+ xfree(id);
return -1;
}
cp++;