(*quoted)[0] = '\'';
(*quoted)[*quotedlen-1] = '\'';
(*quoted)[*quotedlen] = '\0';
- free(escaped);
+ PQfreemem(escaped);
break;
default:
*quoted = safe_emalloc(2, unquotedlen, 3);
to = (char *)PQescapeBytea((unsigned char*)from, from_len, &to_len);
RETVAL_STRINGL(to, to_len-1, 1); /* to_len includes addtional '\0' */
- free(to);
+ PQfreemem(to);
}
/* }}} */
add_assoc_string(return_value, "message", pgsql_notify->relname, 1);
add_assoc_long(return_value, "pid", pgsql_notify->be_pid);
}
+ PQfreemem(pgsql_notify);
}
/* }}} */
Z_STRLEN_P(new_val) = to_len-1; /* PQescapeBytea's to_len includes additional '\0' */
Z_STRVAL_P(new_val) = emalloc(to_len);
memcpy(Z_STRVAL_P(new_val), tmp, to_len);
- free(tmp);
+ PQfreemem(tmp);
php_pgsql_add_quotes(new_val, 1 TSRMLS_CC);
}