Message ID | CAH2r5ms6p4_PdihrLC+ZJ4W=YjqOmwYhDT-fF6swZ5SB0fP4Ww@mail.gmail.com |
---|---|
State | New |
Headers | show |
Series | cifs: use kfree in error path of cifs_writedata_alloc() | expand |
Steve French <smfrench@gmail.com> wrote:
> 'pages' is allocated by kcalloc(), which should freed by kfree().
Either kfree() or kvfree() will do; though kfree() is going to be slightly
faster.
David
diff --git a/fs/cifs/file.c b/fs/cifs/file.c index cd9698209930..9a250fee673f 100644 --- a/fs/cifs/file.c +++ b/fs/cifs/file.c @@ -2440,7 +2440,7 @@ cifs_writedata_alloc(unsigned int nr_pages, work_func_t complete) if (pages) { writedata = cifs_writedata_direct_alloc(pages, complete); if (!writedata) - kvfree(pages); + kfree(pages); }