From 4eda4fd245ba83ae63891e977a5a0ef33f7a2823 Mon Sep 17 00:00:00 2001 From: Ben Walker Date: Thu, 18 May 2017 11:06:44 -0700 Subject: [PATCH] Fix incorrect free in blob/blobfs The channel memory isn't allocated by these libraries, so they can't free it. Change-Id: I30909fa4e77bc5a41b45230f04ba5fe75b172dbf Signed-off-by: Ben Walker --- lib/blob/blobstore.c | 1 - lib/blobfs/blobfs.c | 1 - 2 files changed, 2 deletions(-) diff --git a/lib/blob/blobstore.c b/lib/blob/blobstore.c index 7e1618c44..8c9f6f342 100644 --- a/lib/blob/blobstore.c +++ b/lib/blob/blobstore.c @@ -1060,7 +1060,6 @@ _spdk_bs_channel_create(void *io_device, uint32_t priority, void *ctx_buf, void channel->req_mem = calloc(spdk_max(bs->max_channel_ops, bs->max_md_ops), sizeof(struct spdk_bs_request_set)); if (!channel->req_mem) { - free(channel); return -1; } diff --git a/lib/blobfs/blobfs.c b/lib/blobfs/blobfs.c index 381fd7c79..4885656d0 100644 --- a/lib/blobfs/blobfs.c +++ b/lib/blobfs/blobfs.c @@ -245,7 +245,6 @@ _spdk_fs_channel_create(void *io_device, uint32_t priority, void *ctx_buf, void channel->req_mem = calloc(max_ops, sizeof(struct spdk_fs_request)); if (!channel->req_mem) { - free(channel); return -1; }