memcached_return_t rc;
memcached_stat_st *stats;
+ if (! ptr)
+ {
+ WATCHPOINT_ASSERT(memc_ptr);
+ return NULL;
+ }
+
+ WATCHPOINT_ASSERT(error);
+
+
unlikely (ptr->flags.use_udp)
{
- *error= MEMCACHED_NOT_SUPPORTED;
+ if (error)
+ *error= MEMCACHED_NOT_SUPPORTED;
+
return NULL;
}
if (! stats)
{
- *error= MEMCACHED_MEMORY_ALLOCATION_FAILURE;
+ if (error)
+ *error= MEMCACHED_MEMORY_ALLOCATION_FAILURE;
+
return NULL;
}
rc= MEMCACHED_SOME_ERRORS;
}
- *error= rc;
+ if (error)
+ *error= rc;
+
return stats;
}
return TEST_SUCCESS;
}
+static test_return_t regression_bug_581030(memcached_st *unused)
+{
+ (void)unused;
+
+#ifndef DEBUG
+ memcached_stat_st *local_stat= memcached_stat(NULL, NULL, NULL);
+ test_false(local_stat);
+
+ memcached_stat_free(NULL, NULL);
+#endif
+
+ return TEST_SUCCESS;
+}
+
static void memcached_die(memcached_st* mc, memcached_return error, const char* what, uint32_t it)
{
fprintf(stderr, "Iteration #%u: ", it);
{"lp:583031", 1, (test_callback_fn)regression_bug_583031 },
{"lp:?", 1, (test_callback_fn)regression_bug_ },
{"lp:728286", 1, (test_callback_fn)regression_bug_728286 },
+ {"lp:581030", 1, (test_callback_fn)regression_bug_581030 },
{0, 0, (test_callback_fn)0}
};