Hi Alexander,
Thanks you for the fix, I uploaded in on SVN.
Regards,
Bogdan
Alexander wrote:
> Hello,
>
> I've found a bug in db_postgres module. In res.c file, near line 291, we
> can
> see:
>
> for (col = 0; col < RES_COL_N(_r); col++) {
> switch (RES_TYPES(_r)[col]) {
> case DB_STRING:
> case DB_STR:
> break;
> default:
> LM_DBG("freeing row_buf[%d] at %p\n", col, row_buf[col]);
> pkg_free(row_buf[col]);
> }
>
> pkg_free() is called wrong, it should be like this:
>
> if (row_buf[col]) pkg_free(row_buf[col])
>
> Without this 'if', OpenSIPS produces "WARNING:core:fm_free: free(0)
> called"
> and sometimes even crashes.
>
>
> _______________________________________________
> Users mailing list
> [email protected]
> http://lists.opensips.org/cgi-bin/mailman/listinfo/users
>
>
--
Bogdan-Andrei Iancu
www.voice-system.ro
_______________________________________________
Users mailing list
[email protected]
http://lists.opensips.org/cgi-bin/mailman/listinfo/users