Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 259474
b: refs/heads/master
c: f38cf9c
h: refs/heads/master
v: v3
  • Loading branch information
K. Y. Srinivasan authored and Greg Kroah-Hartman committed Jun 7, 2011
1 parent 3372efa commit ecb1b05
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 3 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 40961de3350b99cfa93cd80437cb39ec287f839a
refs/heads/master: f38cf9ccd61d2acd5bc9121fabf2f6e77d74b885
19 changes: 17 additions & 2 deletions trunk/drivers/staging/hv/channel.c
Original file line number Diff line number Diff line change
Expand Up @@ -355,9 +355,24 @@ static int create_gpadl_header(void *kbuffer, u32 size,
sizeof(struct vmbus_channel_gpadl_body) +
pfncurr * sizeof(u64);
msgbody = kzalloc(msgsize, GFP_KERNEL);
/* FIXME: we probably need to more if this fails */
if (!msgbody)

if (!msgbody) {
struct vmbus_channel_msginfo *pos = NULL;
struct vmbus_channel_msginfo *tmp = NULL;
/*
* Free up all the allocated messages.
*/
list_for_each_entry_safe(pos, tmp,
&msgheader->submsglist,
msglistentry) {

list_del(&pos->msglistentry);
kfree(pos);
}

goto nomem;
}

msgbody->msgsize = msgsize;
(*messagecount)++;
gpadl_body =
Expand Down

0 comments on commit ecb1b05

Please sign in to comment.