summaryrefslogtreecommitdiff
path: root/source3/torture
diff options
context:
space:
mode:
Diffstat (limited to 'source3/torture')
-rw-r--r--source3/torture/nsstest.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/source3/torture/nsstest.c b/source3/torture/nsstest.c
index 4b894fbfc3..121679ed8c 100644
--- a/source3/torture/nsstest.c
+++ b/source3/torture/nsstest.c
@@ -229,12 +229,15 @@ again:
goto again;
}
if (status == NSS_STATUS_NOTFOUND) {
+ SAFE_FREE(buf);
return NULL;
}
if (status != NSS_STATUS_SUCCESS) {
report_nss_error("getgrnam", status);
+ SAFE_FREE(buf);
return NULL;
}
+ SAFE_FREE(buf);
return &grp;
}
@@ -266,12 +269,15 @@ again:
goto again;
}
if (status == NSS_STATUS_NOTFOUND) {
+ SAFE_FREE(buf);
return NULL;
}
if (status != NSS_STATUS_SUCCESS) {
report_nss_error("getgrgid", status);
+ SAFE_FREE(buf);
return NULL;
}
+ SAFE_FREE(buf);
return &grp;
}