diff options
author | David Sommerseth <davids@redhat.com> | 2009-10-12 19:33:56 +0200 |
---|---|---|
committer | David Sommerseth <davids@redhat.com> | 2009-10-12 19:33:56 +0200 |
commit | 258116aaa3e5c9b48394c7a4911efdadbf4187d1 (patch) | |
tree | fedfb78e00367fb1bfc51b33b8ce10f3cf8834f9 /server/parser/xmlparser.c | |
parent | d4037cd833166e5bd0c0d706887e4ec537cdfda4 (diff) | |
download | rteval-258116aaa3e5c9b48394c7a4911efdadbf4187d1.tar.gz rteval-258116aaa3e5c9b48394c7a4911efdadbf4187d1.tar.xz rteval-258116aaa3e5c9b48394c7a4911efdadbf4187d1.zip |
Note to self: it's more clever to use strdup_nullsafe() than strdup() ...
Diffstat (limited to 'server/parser/xmlparser.c')
-rw-r--r-- | server/parser/xmlparser.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/server/parser/xmlparser.c b/server/parser/xmlparser.c index 3ab99bb..70308d0 100644 --- a/server/parser/xmlparser.c +++ b/server/parser/xmlparser.c @@ -127,7 +127,7 @@ char *sqldataValueHash(xmlNode *sql_n) { hash = xmlGetAttrValue(sql_n->properties, "hash"); if( !hash ) { // If no hash attribute is found, just use the raw data - ret = strdup(xmlExtractContent(sql_n)); + ret = strdup_nullsafe(xmlExtractContent(sql_n)); } else if( strcasecmp(hash, "sha1") == 0 ) { const char *indata = xmlExtractContent(sql_n); // SHA1 hashing requested |