Skip to content

Commit

Permalink
Fix a couple of memory leaks.
Browse files Browse the repository at this point in the history
  • Loading branch information
gwsw committed Nov 22, 2018
1 parent cdf5bc3 commit baa42c3
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
2 changes: 1 addition & 1 deletion filename.c
Original file line number Diff line number Diff line change
Expand Up @@ -772,7 +772,7 @@ lglob(filename)
if (*gfilename == '\0')
{
free(gfilename);
return (save(filename));
return (filename);
}
}
#else
Expand Down
5 changes: 4 additions & 1 deletion option.c
Original file line number Diff line number Diff line change
Expand Up @@ -143,8 +143,11 @@ scan_option(s)
if (s == NULL)
return;
if (*str == '+')
{
if (every_first_cmd != NULL)
free(every_first_cmd);
every_first_cmd = save(str+1);
else
} else
{
ungetcc(CHAR_END_COMMAND);
ungetsc(str);
Expand Down

0 comments on commit baa42c3

Please sign in to comment.