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

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

I don't think " && !file_ptr->fil_handle_count" is correct here.

The "fs_globals.fsg_open_files" file object list only depends on the
"fil_ref_count" reference count.

It is OK to remove it from the list when this count goes to zero.

The open table object will still have a reference to the object, but
it can no longer be found using the list.

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

> @@ -500,7 +501,7 @@
> pushr_(xt_sl_unlock, fs_globals.fsg_open_files);
>
> file_ptr->fil_ref_count--;
> - if (!file_ptr->fil_ref_count) {
> + if (!file_ptr->fil_ref_count && !file_ptr->fil_handle_count) {
> xt_sl_delete(self, fs_globals.fsg_open_files, file_ptr->fil_path);
> }

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

« Back to merge proposal