about summary refs log tree commit diff
diff options
context:
space:
mode:
authorChristian Neukirchen <chneukirchen@gmail.com>2015-08-09 19:55:06 +0200
committerChristian Neukirchen <chneukirchen@gmail.com>2015-08-09 19:55:06 +0200
commit77995a181a04fb60398ca3aa8e6bff69cc8c4fad (patch)
tree9491153be7221809d42f12c52dc222742c5d7a22
parent3d5eb4abb3bb59ef157afcdeea65f7194668f8ef (diff)
downloadnq-77995a181a04fb60398ca3aa8e6bff69cc8c4fad.tar.gz
nq-77995a181a04fb60398ca3aa8e6bff69cc8c4fad.tar.xz
nq-77995a181a04fb60398ca3aa8e6bff69cc8c4fad.zip
fq: realloc/strdup failure is fatal
-rw-r--r--fq.c4
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++;
 		}