diff options
Diffstat (limited to 'xlators/performance/quick-read/src/quick-read.c')
-rw-r--r-- | xlators/performance/quick-read/src/quick-read.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/xlators/performance/quick-read/src/quick-read.c b/xlators/performance/quick-read/src/quick-read.c index 8edf495fcdd..92b2f8266ea 100644 --- a/xlators/performance/quick-read/src/quick-read.c +++ b/xlators/performance/quick-read/src/quick-read.c @@ -268,17 +268,19 @@ qr_content_extract (dict_t *xdata) data_t *data = NULL; void *content = NULL; - data = dict_get (xdata, GF_CONTENT_KEY); + dict_get_with_ref (xdata, GF_CONTENT_KEY, &data); if (!data) return NULL; content = GF_CALLOC (1, data->len, gf_qr_mt_content_t); if (!content) - return NULL; + goto out; memcpy (content, data->data, data->len); - return content; +out: + data_unref (data); + return content; } |