1
0
mirror of https://github.com/haiwen/libsearpc.git synced 2025-09-24 19:56:52 +00:00

allow return NULL for json return type

This commit is contained in:
yejianguo
2016-07-02 12:26:26 +08:00
committed by Shuai Lin
parent f37f645998
commit 1bbb420150

View File

@@ -691,7 +691,7 @@ searpc_client_fret__json (char *data, size_t len, GError **error)
if (handle_ret_common(data, len, &object, error) == 0) {
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);
return NULL;
}