From 83da1b192647a7abc2b8cf8561b221a3c0b3d398 Mon Sep 17 00:00:00 2001 From: Luke Bratch Date: Thu, 2 Apr 2026 18:13:51 +0200 Subject: Free pointer if string splitting fails in lastspokelinenumber(). --- replay.c | 1 + 1 file changed, 1 insertion(+) (limited to 'replay.c') diff --git a/replay.c b/replay.c index bdfe2c0..2bd68ae 100644 --- a/replay.c +++ b/replay.c @@ -461,6 +461,7 @@ long lastspokelinenumber(char *nick, char *basedir) { // Try to split if ((token = strsep(&strcopy, " ")) == NULL) { debugprint(DEBUG_CRIT, "lastspokelinenumber(): error splitting string on iteration '%d', returning -1!\n", i); + free(strcopyPtr); fclose(fp); return -1; } -- cgit v1.3