HI,
I found major memory leaks in the call to andresultlists
in swish-e-2.1-dev-24 version of swish-e
Shown below is the patch to fix the memory leak. Please let me know if
this patch is not a good one and if so how I might rectify the leak.
Thanks
Mukund
Patch for memory leak fix
*************************
> void make_db_res_and_free(SWISH *sw,RESULT *res) {
> struct DB_RESULTS tmp;
> memset (&tmp,0,sizeof(struct DB_RESULTS));
> tmp.resultlist = res;
> freeresultlist(sw,&tmp);
> }
>
1422,1423c1429,1433
< if (r1 == NULL || r2 == NULL)
< return NULL;
---
> if (r1 == NULL || r2 == NULL) {
> make_db_res_and_free(sw,r1);
> make_db_res_and_free(sw,r2);
> return NULL;
> }
1902a1913
>
T
Received on Wed Oct 31 02:34:52 2001