]> git.tuebingen.mpg.de Git - paraslash.git/commitdiff
string: Set result pointer to NULL on errors.
authorAndre Noll <maan@systemlinux.org>
Sun, 28 Aug 2011 04:35:37 +0000 (06:35 +0200)
committerAndre Noll <maan@systemlinux.org>
Sat, 3 Sep 2011 14:40:37 +0000 (16:40 +0200)
...and be strict in what you return.

string.c

index b16109ca759f7e4cc6b9952c1ec9f2aaac1598c4..0a32c0f48b3b8fc9a1b5194587fc10068789a064 100644 (file)
--- a/string.c
+++ b/string.c
@@ -762,6 +762,7 @@ err:
        while (num_words > 0)
                free(argv[--num_words]);
        free(argv);
+       *result = NULL;
        return ret;
 }