would try to free it. Also, send_search_result was not freeing the pointer,
but it should have been.
size_t len = 0, i = 0;
char *v2;
- if(ref == NULL) return (char *)text;
-
+ if(ref == NULL)
+ {
+ if (text)
+ return ch_strdup(text);
+ else
+ return NULL;
+ }
+
if (text) {
len = strlen( text );
if (text[len-1] != '\n')
(long) tag, (long) err, text ? text : "" );
if( tmp != NULL ) {
- free(tmp);
+ ch_free(tmp);
}
}
(long) op->o_connid, (long) op->o_opid,
(long) tag, (long) err, text ? text : "" );
+ if (tmp != NULL)
+ ch_free(tmp);
}