mirror of
https://github.com/haiwen/libsearpc.git
synced 2025-09-25 12:32:53 +00:00
allow return NULL for json return type
This commit is contained in:
@@ -691,7 +691,7 @@ searpc_client_fret__json (char *data, size_t len, GError **error)
|
|||||||
|
|
||||||
if (handle_ret_common(data, len, &object, error) == 0) {
|
if (handle_ret_common(data, len, &object, error) == 0) {
|
||||||
const json_t *ret_obj = json_object_get (object, "ret");
|
const json_t *ret_obj = json_object_get (object, "ret");
|
||||||
if (json_is_null(ret_obj)) {
|
if (!ret_obj || json_is_null(ret_obj)) {
|
||||||
json_decref(object);
|
json_decref(object);
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user