}
else if (*error == MEMCACHED_END && memcached_string_length((memcached_string_st *)(&result->value)) == 0)
{
- return NULL;
+ goto error;
}
else if (*error == MEMCACHED_END)
{
WATCHPOINT_ASSERT(0); /* If this happens we have somehow messed up the fetch */
- return NULL;
+ goto error;
}
else if (*error != MEMCACHED_SUCCESS)
{
- return NULL;
+ goto error;
}
else
{
}
+error:
+ memcached_result_free(result);
+
return NULL;
}