OSDN Git Service
(root)
/
android-x86
/
external-alsa-utils.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
5e4997b
)
Removed memory leak
author
Abramo Bagnara
<abramo@alsa-project.org>
Sat, 7 Oct 2000 17:00:33 +0000
(17:00 +0000)
committer
Abramo Bagnara
<abramo@alsa-project.org>
Sat, 7 Oct 2000 17:00:33 +0000
(17:00 +0000)
aplay/aplay.c
patch
|
blob
|
history
diff --git
a/aplay/aplay.c
b/aplay/aplay.c
index
9ec9912
..
aa3a2ae
100644
(file)
--- a/
aplay/aplay.c
+++ b/
aplay/aplay.c
@@
-583,6
+583,7
@@
int main(int argc, char *argv[])
capturev(&argv[optind], argc - optind);
}
snd_pcm_close(handle);
+ free(audiobuf);
return EXIT_SUCCESS;
}
@@
-819,7
+820,7
@@
static void set_params(void)
bits_per_sample = snd_pcm_format_physical_width(setup.format.sfmt);
bits_per_frame = bits_per_sample * setup.format.channels;
buffer_bytes = buffer_size * bits_per_frame / 8;
- audiobuf =
malloc(
buffer_bytes);
+ audiobuf =
realloc(audiobuf,
buffer_bytes);
if (audiobuf == NULL) {
error("not enough memory");
exit(EXIT_FAILURE);