diff options
author | Martin Nagy <mnagy@redhat.com> | 2010-02-16 15:13:25 +0100 |
---|---|---|
committer | Rob Crittenden <rcritten@redhat.com> | 2010-02-16 10:42:45 -0500 |
commit | a292e9901b491307738637de614a6a69a153bd40 (patch) | |
tree | 995b8b3dbb0aaa95c335af091d4c75879564e86c /ipa-client | |
parent | 58746226d4b36bc40de91d4d1dd283e9faaff639 (diff) | |
download | freeipa-a292e9901b491307738637de614a6a69a153bd40.tar.gz freeipa-a292e9901b491307738637de614a6a69a153bd40.tar.xz freeipa-a292e9901b491307738637de614a6a69a153bd40.zip |
Fix a crash and memory leak in get_config_entry()
Diffstat (limited to 'ipa-client')
-rw-r--r-- | ipa-client/config.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/ipa-client/config.c b/ipa-client/config.c index f590d10a2..c32946ed6 100644 --- a/ipa-client/config.c +++ b/ipa-client/config.c @@ -91,7 +91,7 @@ get_config_entry(char * in_data, const char *section, const char *key) if (NULL == in_data) return NULL; else - strdup(in_data); + data = strdup(in_data); for (line = strtok_r(data, "\n", &ptr); line != NULL; line = strtok_r(NULL, "\n", &ptr)) { @@ -156,5 +156,6 @@ get_config_entry(char * in_data, const char *section, const char *key) } } } + free(data); return NULL; } |