id summary reporter owner description type status priority milestone component version severity resolution keywords cc 4351 "memory leak while using function ""ExecuteSQL"" of class OGRDataSource" startwithdp warmerdam "The ""ExecuteSQL"" function returns an OGRLayer containing the results of the query,Then I used ReleaseResultSet func to deallocate the OGRLayer memory. And I found that there was memory leaks around the where expression of the SQL statement; Finally I found there was a bug in the ""swq_select_free"" function; this function doesn't free the where_expr member of the swq_select struct; The type of where_expr is also a struct--""swq_expr"" which needs to be freed by function ""swq_expr_free""; I added the followings to the ""swq_select_free"" function to fix this bug: if( select_info->where_expr!=NULL ) { swq_expr_free(select_info->where_expr); } " defect closed normal default 1.7.0 normal wontfix memory leak