Skip to content

Commit

Permalink
Better cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
laruence committed Aug 26, 2012
1 parent 74bff99 commit 760d0db
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 6 deletions.
6 changes: 2 additions & 4 deletions yaf_controller.c
Original file line number Diff line number Diff line change
Expand Up @@ -123,8 +123,7 @@ static zval * yaf_controller_render(yaf_controller_t *instance, char *action_nam
zend_call_method_with_1_params(&view, Z_OBJCE_P(view), NULL, "render", &ret, param);
}

zval_dtor(param);
efree(param);
zval_ptr_dtor(&param);

if (!ret || (Z_TYPE_P(ret) == IS_BOOL && !Z_BVAL_P(ret))) {
return NULL;
Expand Down Expand Up @@ -181,8 +180,7 @@ static int yaf_controller_display(zend_class_entry *ce, yaf_controller_t *instan
zend_call_method_with_1_params(&view, Z_OBJCE_P(view), NULL, "display", &ret, param);
}

zval_dtor(param);
efree(param);
zval_ptr_dtor(&param);

if (!ret) {
return 0;
Expand Down
3 changes: 1 addition & 2 deletions yaf_response.c
Original file line number Diff line number Diff line change
Expand Up @@ -81,8 +81,7 @@ static int yaf_response_set_body(yaf_response_t *response, char *name, int name_

zbody = zend_read_property(response_ce, response, ZEND_STRL(YAF_RESPONSE_PROPERTY_NAME_BODY), 1 TSRMLS_CC);

zval_dtor(zbody);
efree(zbody);
zval_ptr_dtor(&zbody);

MAKE_STD_ZVAL(zbody);
ZVAL_STRINGL(zbody, body, body_len, 1);
Expand Down

0 comments on commit 760d0db

Please sign in to comment.