Skip to content

Commit

Permalink
Shrink ls
Browse files Browse the repository at this point in the history
  • Loading branch information
ccoffing committed Jan 7, 2024
1 parent 6938738 commit 23a7377
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions elkscmd/file_utils/ls.c
Original file line number Diff line number Diff line change
Expand Up @@ -124,8 +124,7 @@ static void pushstack(struct stack *pstack, char *entry, long l)
pstack->allocd += 64;
allocbuf = (struct sort*)realloc(pstack->buf, sizeof(struct sort)*pstack->allocd);
if (!allocbuf) {
free(pstack->buf);
fprintf(stderr, "ls: error: out of memory (realloc pstack failed)\n");
fprintf(stderr, "ls: error: out of memory\n");
exit(EXIT_FAILURE);
}
pstack->buf = allocbuf;
Expand Down

0 comments on commit 23a7377

Please sign in to comment.