summaryrefslogtreecommitdiff
path: root/usr.bin/cdio
diff options
context:
space:
mode:
authorKenneth R Westerback <krw@cvs.openbsd.org>2022-10-10 14:52:03 +0000
committerKenneth R Westerback <krw@cvs.openbsd.org>2022-10-10 14:52:03 +0000
commit1279f37fb50fab454492d6a2ec8aec43e6d0c953 (patch)
tree0077f46588d5a6405b3514f043f625ec108d8372 /usr.bin/cdio
parent707d88e4913981944ac2e4e7fd410fdb908403fb (diff)
Don't leak 'sec' in error path.
Diffstat (limited to 'usr.bin/cdio')
-rw-r--r--usr.bin/cdio/rip.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/usr.bin/cdio/rip.c b/usr.bin/cdio/rip.c
index 3ff1c8e05db..0c198e661ab 100644
--- a/usr.bin/cdio/rip.c
+++ b/usr.bin/cdio/rip.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: rip.c,v 1.19 2022/10/07 19:59:19 krw Exp $ */
+/* $OpenBSD: rip.c,v 1.20 2022/10/10 14:52:02 krw Exp $ */
/*
* Copyright (c) 2007 Alexey Vatchenko <av@bsdua.org>
@@ -402,6 +402,7 @@ read_track(struct track *ti)
(sio_write(ti->hdl, sec, blksize) == 0)) {
sio_close(ti->hdl);
ti->hdl = NULL;
+ free(sec);
fprintf(stderr, "\nerror while writing to audio "
"output\n");
return (-1);