]> git.ipfire.org Git - thirdparty/e2fsprogs.git/commitdiff
libss: fix potential null dereference if realloc() fails
authorTheodore Ts'o <tytso@mit.edu>
Sat, 11 Jan 2014 02:13:15 +0000 (21:13 -0500)
committerTheodore Ts'o <tytso@mit.edu>
Sat, 11 Jan 2014 02:13:15 +0000 (21:13 -0500)
Addresses-Coverity-Id: #1153630

Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
lib/ss/parse.c

index 45a2de0a14b381ba0f68e03aea313b51ff962cc6..7c6c6791ab3df2f34dec45d3448a6de6d89b288d 100644 (file)
@@ -93,7 +93,7 @@ char **ss_parse(int sci_idx, register char *line_ptr, int *argc_ptr)
                parse_mode = TOKEN;
                cp = line_ptr;
                new_argv = NEW_ARGV (argv, argc);
-               if (argv == NULL) {
+               if (new_argv == NULL) {
                        free(argv);
                        *argc_ptr = 0;
                        return NULL;