Skip to content

Commit

Permalink
fix: check for null value before in drop function
Browse files Browse the repository at this point in the history
  • Loading branch information
jean-roland committed Jun 14, 2024
1 parent 8a1db82 commit e8c4e29
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/api/api.c
Original file line number Diff line number Diff line change
Expand Up @@ -686,7 +686,7 @@ void z_closure_zid_call(const z_owned_closure_zid_t *closure, const z_id_t *id)
return ret; \
} \
void z_##name##_drop(z_owned_##name##_t *obj) { \
if (obj->_val != NULL) { \
if ((obj != NULL) && (obj->_val != NULL)) { \
f_free(&obj->_val); \
} \
}
Expand Down

0 comments on commit e8c4e29

Please sign in to comment.