summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLuke Bratch <luke@bratch.co.uk>2026-04-02 18:13:51 +0200
committerLuke Bratch <luke@bratch.co.uk>2026-04-02 18:13:51 +0200
commit83da1b192647a7abc2b8cf8561b221a3c0b3d398 (patch)
treea264c97d28edb739dfe2d370a5edb76cd8b424a4
parent22aef989975b4455cfd267f47e67e0ea4d1bac72 (diff)
Free pointer if string splitting fails in lastspokelinenumber().
-rw-r--r--replay.c1
1 files changed, 1 insertions, 0 deletions
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;
}