summaryrefslogtreecommitdiff
path: root/src/sss_client/autofs
diff options
context:
space:
mode:
Diffstat (limited to 'src/sss_client/autofs')
-rw-r--r--src/sss_client/autofs/autofs_test_client.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/sss_client/autofs/autofs_test_client.c b/src/sss_client/autofs/autofs_test_client.c
index 6e95c174..386c890c 100644
--- a/src/sss_client/autofs/autofs_test_client.c
+++ b/src/sss_client/autofs/autofs_test_client.c
@@ -79,9 +79,9 @@ int main(int argc, const char *argv[])
ret = _sss_getautomntent_r(&key, &value, ctx);
if (ret == 0) {
printf("key: %s\t\tvalue: %s\n", key, value);
+ free(key);
+ free(value);
}
- free(key);
- free(value);
} while(ret == 0);
if (ret != 0 && ret != ENOENT) {
@@ -99,8 +99,8 @@ int main(int argc, const char *argv[])
exit(EXIT_FAILURE);
} else {
printf("key: %s\t\tvalue: %s\n", pc_key, value);
+ free(value);
}
- free(value);
}
ret = _sss_endautomntent(&ctx);