1
0
mirror of https://git.FreeBSD.org/src.git synced 2025-01-28 16:43:09 +00:00

Plug memory leak.

MFC after:	1 week
This commit is contained in:
Pyun YongHyeon 2004-12-22 08:17:18 +00:00
parent 3276f95241
commit 2d25239038
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=139167

View File

@ -77,6 +77,7 @@ chunk_name(chunk_e type)
struct disk *
Open_Disk(const char *name)
{
struct disk *d;
char *conftxt;
size_t txtsize;
int error;
@ -98,8 +99,10 @@ Open_Disk(const char *name)
return (NULL);
}
conftxt[txtsize] = '\0'; /* in case kernel bug is still there */
d = Int_Open_Disk(name, conftxt);
free(conftxt);
return Int_Open_Disk(name, conftxt);
return (d);
}
void