aboutsummaryrefslogtreecommitdiff
path: root/sound/core
diff options
context:
space:
mode:
authorTakashi Iwai <tiwai@suse.de>2009-09-10 15:32:43 +0200
committerTakashi Iwai <tiwai@suse.de>2009-09-10 15:32:43 +0200
commitd0064a1b22d0f60058902a870e6bf9aab0d8202c (patch)
treef14a4ff9aae8fd98b5df4790df469fcaf7d4ad05 /sound/core
parentb81e5ab34d960335c71ce33bf283ff5a22463a67 (diff)
parent9983aa62c321a22774e47cf701b6d8b16d92a822 (diff)
Merge branch 'topic/cleanup' into for-linus
* topic/cleanup: ALSA: info - Use krealloc()
Diffstat (limited to 'sound/core')
-rw-r--r--sound/core/info.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/sound/core/info.c b/sound/core/info.c
index 35df614f6c5..3d1f5137420 100644
--- a/sound/core/info.c
+++ b/sound/core/info.c
@@ -88,12 +88,10 @@ static int resize_info_buffer(struct snd_info_buffer *buffer,
char *nbuf;
nsize = PAGE_ALIGN(nsize);
- nbuf = kmalloc(nsize, GFP_KERNEL);
+ nbuf = krealloc(buffer->buffer, nsize, GFP_KERNEL);
if (! nbuf)
return -ENOMEM;
- memcpy(nbuf, buffer->buffer, buffer->len);
- kfree(buffer->buffer);
buffer->buffer = nbuf;
buffer->len = nsize;
return 0;