Skip to content

Commit

Permalink
Frees memory that parser is using
Browse files Browse the repository at this point in the history
  • Loading branch information
Julio Viera committed Sep 22, 2023
1 parent 8f1eee1 commit 74d2f79
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions eatmemory.c
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,8 @@ int main(int argc, char *argv[]){
int timeout = ap_get_int_value(parser, "timeout");
char* memory_to_eat = ap_get_args(parser)[0];

ap_free(parser);

int len=strlen(memory_to_eat);
char unit=memory_to_eat[len - 1];
long size=-1;
Expand Down

0 comments on commit 74d2f79

Please sign in to comment.