Code review comment for lp:~vkolesnikov/pbxt/pbxt-heap-corruption

Revision history for this message
Paul McCullagh (paul-mccullagh) wrote :

On May 27, 2009, at 5:40 PM, Vladimir Kolesnikov wrote:

> - if (file_ptr->fil_memmap) {
> + if (file_ptr->fil_memmap && !file_ptr->fil_handle_count) {
> fs_close_fmap(self, file_ptr->fil_memmap);
> file_ptr->fil_memmap = NULL;
> }
> @@ -169,7 +169,8 @@
> file_ptr->fil_path = NULL;
> }
>
> - xt_free(self, file_ptr);

Small optimization, "!file_ptr->fil_ref_count && " is not required
here (checked above).

>
> + if (!file_ptr->fil_ref_count && !file_ptr->fil_handle_count)
> + xt_free(self, file_ptr);
> }
> }

--
Paul McCullagh
PrimeBase Technologies
www.primebase.org
www.blobstreaming.org
pbxt.blogspot.com

« Back to merge proposal