Skip to content

Commit b89153b

Browse files
committed
address reviews
1 parent 57a1f3f commit b89153b

1 file changed

Lines changed: 5 additions & 1 deletion

File tree

provider.c

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -195,7 +195,11 @@ static void oauth_provider_set_std_params(zval *provider_obj, HashTable *sbs_var
195195
static inline int oauth_provider_set_param_value(HashTable *ht, char *key, zval *val) /* {{{ */
196196
{
197197
Z_TRY_ADDREF_P(val);
198-
return zend_hash_str_update(ht, key, strlen(key), val) != NULL ? SUCCESS : FAILURE;
198+
if (zend_hash_str_update(ht, key, strlen(key), val) == NULL) {
199+
Z_TRY_DELREF_P(val);
200+
return FAILURE;
201+
}
202+
return SUCCESS;
199203
}
200204
/* }}} */
201205

0 commit comments

Comments
 (0)