diff options
| -rw-r--r-- | drivers/staging/usbip/userspace/libsrc/names.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/drivers/staging/usbip/userspace/libsrc/names.c b/drivers/staging/usbip/userspace/libsrc/names.c index 3c8d28b771e0..81ff8522405c 100644 --- a/drivers/staging/usbip/userspace/libsrc/names.c +++ b/drivers/staging/usbip/userspace/libsrc/names.c | |||
| @@ -169,14 +169,14 @@ static void *my_malloc(size_t size) | |||
| 169 | struct pool *p; | 169 | struct pool *p; |
| 170 | 170 | ||
| 171 | p = calloc(1, sizeof(struct pool)); | 171 | p = calloc(1, sizeof(struct pool)); |
| 172 | if (!p) { | 172 | if (!p) |
| 173 | free(p); | ||
| 174 | return NULL; | 173 | return NULL; |
| 175 | } | ||
| 176 | 174 | ||
| 177 | p->mem = calloc(1, size); | 175 | p->mem = calloc(1, size); |
| 178 | if (!p->mem) | 176 | if (!p->mem) { |
| 177 | free(p); | ||
| 179 | return NULL; | 178 | return NULL; |
| 179 | } | ||
| 180 | 180 | ||
| 181 | p->next = pool_head; | 181 | p->next = pool_head; |
| 182 | pool_head = p; | 182 | pool_head = p; |
