MFC r289687,r289693:
r289687: Free buffer before returning from cd9660_write_path_table to avoid leaking it after returning from the function PR: 203647 Submitted by: Thomas Schmitt <scdbackup@gmx.net> Coverity CID: 978431 Sponsored by: EMC / Isilon Storage Division r289693: Unbreak makefs -t cd9660 after r289687 buffer_head needs to be freed -- not buffer Detected by jemalloc, i.e. running makefs failed the arena assert because my copy of malloc on CURRENT is compiled with the default !MALLOC_PRODUCTION asserts on Pointyhat to: ngie PR: 203647 Sponsored by: EMC / Isilon Storage Division
This commit is contained in:
parent
bc7ac4fb8b
commit
f79bd9b3f6
@ -165,7 +165,7 @@ cd9660_write_path_table(FILE *fd, off_t sector, int mode)
|
||||
diskStructure.pathTableLength);
|
||||
unsigned char *buffer;
|
||||
unsigned char *buffer_head;
|
||||
int len;
|
||||
int len, ret;
|
||||
path_table_entry temp_entry;
|
||||
cd9660node *ptcur;
|
||||
|
||||
@ -213,8 +213,10 @@ cd9660_write_path_table(FILE *fd, off_t sector, int mode)
|
||||
ptcur = ptcur->ptnext;
|
||||
}
|
||||
|
||||
return cd9660_write_filedata(fd, sector, buffer_head,
|
||||
ret = cd9660_write_filedata(fd, sector, buffer_head,
|
||||
path_table_sectors);
|
||||
free(buffer_head);
|
||||
return ret;
|
||||
}
|
||||
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user