artulab
projects
/
openbsd
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
dfacfb1
)
close fd on an exit path
author
jsg
<jsg@openbsd.org>
Wed, 31 May 2017 04:18:58 +0000
(
04:18
+0000)
committer
jsg
<jsg@openbsd.org>
Wed, 31 May 2017 04:18:58 +0000
(
04:18
+0000)
usr.bin/audioctl/audioctl.c
patch
|
blob
|
history
diff --git
a/usr.bin/audioctl/audioctl.c
b/usr.bin/audioctl/audioctl.c
index
22f0078
..
bbc035a
100644
(file)
--- a/
usr.bin/audioctl/audioctl.c
+++ b/
usr.bin/audioctl/audioctl.c
@@
-1,4
+1,4
@@
-/* $OpenBSD: audioctl.c,v 1.3
4 2016/08/31 09:48:26
jsg Exp $ */
+/* $OpenBSD: audioctl.c,v 1.3
5 2017/05/31 04:18:58
jsg Exp $ */
/*
* Copyright (c) 2016 Alexandre Ratchov <alex@caoua.org>
*
@@
-260,8
+260,10
@@
main(int argc, char **argv)
printf("\n");
}
}
- if (!set)
+ if (!set) {
+ close(fd);
return 0;
+ }
if (ioctl(fd, AUDIO_SETPAR, &wpar) < 0)
err(1, "AUDIO_SETPAR");
if (ioctl(fd, AUDIO_GETPAR, &wpar) < 0)