summaryrefslogtreecommitdiffstats
path: root/ipa-client/config.c
diff options
context:
space:
mode:
Diffstat (limited to 'ipa-client/config.c')
-rw-r--r--ipa-client/config.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/ipa-client/config.c b/ipa-client/config.c
index 81cb793db..f590d10a2 100644
--- a/ipa-client/config.c
+++ b/ipa-client/config.c
@@ -86,7 +86,12 @@ get_config_entry(char * in_data, const char *section, const char *key)
char *ptr, *p, *tmp;
char *line;
int in_section = 0;
- char * data = strdup(in_data);
+ char * data;
+
+ if (NULL == in_data)
+ return NULL;
+ else
+ strdup(in_data);
for (line = strtok_r(data, "\n", &ptr); line != NULL;
line = strtok_r(NULL, "\n", &ptr)) {