NULL , free , malloc ed ( ). (, , -1, fd).
goto () - "" . , goto , -, , , , "gotos around gotos" . NULL ( ).
.
:
void my_func() {
char *base_address = NULL;
char *ping_url = NULL;
if (base_address(getThis(), 0, &base_address TSRMLS_CC) == FAILURE) {
goto cleanup;
}
if (asprintf(&ping_url, "%s/ping", base_address) < 0) {
goto cleanup;
}
cleanup:
free(base_address);
if (ping_url) {
free(ping_url);
}
}
user166390