diff options
author | bpc2003 <wpesfriendnva@gmail.com> | 2025-03-17 14:03:56 -0400 |
---|---|---|
committer | bpc2003 <wpesfriendnva@gmail.com> | 2025-03-17 14:03:56 -0400 |
commit | 0b3bce119ead5572e4ed48a2c8bc9203bfb1b90c (patch) | |
tree | a06de046c1a28a5522fa0f01929185df6377a261 /src/main.c | |
parent | 399dedb2cb91efd45e10203b8ff7f949679c02df (diff) |
Add goto label for readdb fail condition
Diffstat (limited to 'src/main.c')
-rw-r--r-- | src/main.c | 2 |
1 files changed, 2 insertions, 0 deletions
@@ -24,6 +24,8 @@ int main(int argc, char **argv) if (argc == 2) filename = argv[1]; tablist_t *list = readdb(filename); + if (list == NULL) + exit(1); char *cmd = calloc(1024, sizeof(char)); while (fgets(cmd, 1024, stdin) != NULL) { |