diff options
author | Takashi Iwai <tiwai@suse.de> | 2009-09-10 15:32:43 +0200 |
---|---|---|
committer | Takashi Iwai <tiwai@suse.de> | 2009-09-10 15:32:43 +0200 |
commit | d0064a1b22d0f60058902a870e6bf9aab0d8202c (patch) | |
tree | f14a4ff9aae8fd98b5df4790df469fcaf7d4ad05 /sound/core | |
parent | Merge branch 'topic/azt3328' into for-linus (diff) | |
parent | ALSA: info - Use krealloc() (diff) | |
download | linux-d0064a1b22d0f60058902a870e6bf9aab0d8202c.tar.xz linux-d0064a1b22d0f60058902a870e6bf9aab0d8202c.zip |
Merge branch 'topic/cleanup' into for-linus
* topic/cleanup:
ALSA: info - Use krealloc()
Diffstat (limited to 'sound/core')
-rw-r--r-- | sound/core/info.c | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/sound/core/info.c b/sound/core/info.c index 35df614f6c55..3d1f5137420a 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; |