1
0
mirror of https://git.FreeBSD.org/src.git synced 2025-01-14 14:55:41 +00:00

Plug memory leak.

Submitted by:	Ted Unangst
Found by:	Coverity Prevent analysis tool
Approved by:	phk
MFC after:	3 days
This commit is contained in:
Pawel Jakub Dawidek 2005-03-16 20:48:13 +00:00
parent 402f124a2b
commit 42cfb5bada
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=143719

View File

@ -372,10 +372,9 @@ g_bsd_ioctl(struct g_provider *pp, u_long cmd, void *data, int fflag, struct thr
}
case DIOCSDINFO:
case DIOCWDINFO: {
label = g_malloc(LABELSIZE, M_WAITOK);
if (!(fflag & FWRITE))
return (EPERM);
label = g_malloc(LABELSIZE, M_WAITOK);
/* The disklabel to set is the ioctl argument. */
bsd_disklabel_le_enc(label, data);