diff options
author | dormando <dormando@rydia.net> | 2017-12-18 22:16:02 -0800 |
---|---|---|
committer | dormando <dormando@rydia.net> | 2017-12-18 22:16:02 -0800 |
commit | d15f8712272f356b63ef42130175bc4a9d0729c5 (patch) | |
tree | 4051ecdd279e4332aec75ff81aebbe8da83dabc7 /storage.c | |
parent | 5120d4a05fd8e7e1a793da44165efe1129370380 (diff) | |
download | memcached-d15f8712272f356b63ef42130175bc4a9d0729c5.tar.gz |
extstore: check malloc in compaction thread.
simple change.
Diffstat (limited to 'storage.c')
-rw-r--r-- | storage.c | 7 |
1 files changed, 5 insertions, 2 deletions
@@ -334,12 +334,15 @@ static void *storage_compact_thread(void *arg) { logger *l = logger_create(); if (l == NULL) { - fprintf(stderr, "Failed to allocate logger for LRU maintainer thread\n"); + fprintf(stderr, "Failed to allocate logger for storage compaction thread\n"); abort(); } - // TODO: check error. readback_buf = malloc(settings.ext_wbuf_size); + if (readback_buf == NULL) { + fprintf(stderr, "Failed to allocate readback buffer for storage compaction thread\n"); + abort(); + } pthread_mutex_init(&wrap.lock, NULL); wrap.done = false; |