From 522b07d9fe25782d764b6612fc296c86e778ffc6 Mon Sep 17 00:00:00 2001 From: Julia Lawall Date: Sat, 21 Nov 2009 12:51:47 +0100 Subject: [PATCH] --- yaml --- r: 174988 b: refs/heads/master c: 06e182911da95a304eaab71288a47bc5c799c4eb h: refs/heads/master v: v3 --- [refs] | 2 +- trunk/drivers/usb/host/xhci-mem.c | 5 ++++- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/[refs] b/[refs] index 602268b7a692..71e497fbf08f 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: 0c7a2b72746a96f999fd2728520d03d94879be69 +refs/heads/master: 06e182911da95a304eaab71288a47bc5c799c4eb diff --git a/trunk/drivers/usb/host/xhci-mem.c b/trunk/drivers/usb/host/xhci-mem.c index 711dc554e716..9034721106d7 100644 --- a/trunk/drivers/usb/host/xhci-mem.c +++ b/trunk/drivers/usb/host/xhci-mem.c @@ -779,14 +779,17 @@ struct xhci_command *xhci_alloc_command(struct xhci_hcd *xhci, command->in_ctx = xhci_alloc_container_ctx(xhci, XHCI_CTX_TYPE_INPUT, mem_flags); - if (!command->in_ctx) + if (!command->in_ctx) { + kfree(command); return NULL; + } if (allocate_completion) { command->completion = kzalloc(sizeof(struct completion), mem_flags); if (!command->completion) { xhci_free_container_ctx(xhci, command->in_ctx); + kfree(command); return NULL; } init_completion(command->completion);