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:
parent
402f124a2b
commit
42cfb5bada
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=143719
@ -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);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user