diff options
author | Christian Neukirchen <chneukirchen@gmail.com> | 2015-08-09 19:55:06 +0200 |
---|---|---|
committer | Christian Neukirchen <chneukirchen@gmail.com> | 2015-08-09 19:55:06 +0200 |
commit | 77995a181a04fb60398ca3aa8e6bff69cc8c4fad (patch) | |
tree | 9491153be7221809d42f12c52dc222742c5d7a22 | |
parent | 3d5eb4abb3bb59ef157afcdeea65f7194668f8ef (diff) | |
download | nq-77995a181a04fb60398ca3aa8e6bff69cc8c4fad.tar.gz nq-77995a181a04fb60398ca3aa8e6bff69cc8c4fad.tar.xz nq-77995a181a04fb60398ca3aa8e6bff69cc8c4fad.zip |
fq: realloc/strdup failure is fatal
-rw-r--r-- | fq.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/fq.c b/fq.c index f603d00..8dbb3f3 100644 --- a/fq.c +++ b/fq.c @@ -103,10 +103,10 @@ main(int argc, char *argv[]) len = 2*len + 1; argv = realloc(argv, len * sizeof (char *)); if (!argv) - break; + exit(222); } if (!(argv[argc] = strdup(d->d_name))) - break; + exit(222); argc++; } |