From: Date: Mon, 21 Jan 2008 04:33:57 +0000 (-0800) Subject: Fix for bad null pointer on flag by Toru Maesaka. X-Git-Tag: 0.14~4^2~4 X-Git-Url: https://git.m6w6.name/?a=commitdiff_plain;h=02859b1de56972ed7b7538dfd3079a4e753fce41;p=awesomized%2Flibmemcached Fix for bad null pointer on flag by Toru Maesaka. --- diff --git a/ChangeLog b/ChangeLog index daaccab8..3bebceb1 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,4 +1,5 @@ + * Fix for bad null pointer on flag by Toru Maesaka. * Refactor of all IO to just pass in the active server * Problem configuring (PKG_CHECK_MODULES) fixed by removal of "rpath" in support/libmemcached.pc.in (Thanks to Ross McFarland). diff --git a/lib/memcached_fetch.c b/lib/memcached_fetch.c index 79179114..6c4d393a 100644 --- a/lib/memcached_fetch.c +++ b/lib/memcached_fetch.c @@ -162,7 +162,9 @@ char *memcached_fetch(memcached_st *ptr, char *key, size_t *key_length, strncpy(key, result_buffer->key, result_buffer->key_length); *key_length= result_buffer->key_length; } - *flags= result_buffer->flags; + + if (result_buffer->flags) + *flags= result_buffer->flags; return memcached_string_c_copy(&result_buffer->value); }