Changeset 1907
- Timestamp:
- 02/07/07 14:42:37 (1 year ago)
- Files:
-
- swish-e/trunk/pod/CHANGES.pod (modified) (2 diffs)
- swish-e/trunk/src/db_native.c (modified) (6 diffs)
- swish-e/trunk/src/proplimit.c (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
swish-e/trunk/pod/CHANGES.pod
r1906 r1907 10 10 11 11 =over 4 12 13 =item Patched leaks 14 15 Anthony Dovgal patched two leaks. One when there's a failure to 16 open a file the file name was not freed. 17 18 SwishSetSearchLimit() was nulling the search limits when an error was 19 found in the parameters, but not freeing the existing limits. 12 20 13 21 =item Leak in SwishResetSearchLimit … … 21 29 relevant properties of the search object. 22 30 Patch provided by Antony Dovgal. 23 24 31 25 32 swish-e/trunk/src/db_native.c
r1812 r1907 535 535 { 536 536 set_progerrno(INDEX_FILE_ERROR, DB->sw, "Couldn't open the property file \"%s\": ", s); 537 efree(s); 537 538 return (void *) DB; 538 539 } … … 550 551 { 551 552 set_progerrno(INDEX_FILE_ERROR, DB->sw, "Couldn't open the btree file \"%s\": ", s); 553 efree(s); 552 554 return (void *) DB; 553 555 } … … 566 568 { 567 569 set_progerrno(INDEX_FILE_ERROR, DB->sw, "Couldn't open the presorted index file \"%s\": ", s); 570 efree(s); 568 571 return (void *) DB; 569 572 } … … 582 585 { 583 586 set_progerrno(INDEX_FILE_ERROR, DB->sw, "Couldn't open the worddata file \"%s\": ", s); 587 efree(s); 584 588 return (void *) DB; 585 589 } … … 598 602 { 599 603 set_progerrno(INDEX_FILE_ERROR, DB->sw, "Couldn't open the hashfile file \"%s\": ", s); 604 efree(s); 600 605 return (void *) DB; 601 606 } … … 614 619 { 615 620 set_progerrno(INDEX_FILE_ERROR, DB->sw, "Couldn't open the array file \"%s\": ", s); 621 efree(s); 616 622 return (void *) DB; 617 623 } swish-e/trunk/src/proplimit.c
r1903 r1907 240 240 int SwishSetSearchLimit(SEARCH_OBJECT *srch, char *propertyname, char *low, char *hi) 241 241 { 242 LIMIT_PARAMS *params; 242 243 reset_lasterror( srch->sw ); 243 244 … … 248 249 } 249 250 250 srch->limit_params = setlimit_params( srch->sw, srch->limit_params, propertyname, low, hi ); 251 /* Add new limit parameter to list */ 252 params = setlimit_params( srch->sw, srch->limit_params, propertyname, low, hi ); 253 254 /* Only reset list if no error */ 255 if ( params ) 256 srch->limit_params = params; 257 258 251 259 return ( srch->sw->lasterror == 0 ); 252 253 260 } 254 261
