From: Eric S. Raymond Date: Wed, 14 Jun 2017 12:50:41 +0000 (-0400) Subject: Fix a minor memory leak. X-Git-Tag: 1.1~322 X-Git-Url: https://jxself.org/git/?a=commitdiff_plain;h=fdd72c64171ce7a7a9983930c34b31884b45aaf7;p=open-adventure.git Fix a minor memory leak. --- diff --git a/saveresume.c b/saveresume.c index 340ea65..af94c4a 100644 --- a/saveresume.c +++ b/saveresume.c @@ -59,8 +59,8 @@ int saveresume(FILE *input, bool resume) fp = fopen(name,(resume ? READ_MODE : WRITE_MODE)); if (fp == NULL) printf("Can't open file %s, try again.\n", name); + linenoiseFree(name); } - linenoiseFree(name); DATIME(&i,&k); k=i+650*k;