Date: Fri, 13 Dec 2019 08:20:21 +0000 (UTC) From: Toomas Soome <tsoome@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r355702 - head/stand/common Message-ID: <201912130820.xBD8KLO5064368@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: tsoome Date: Fri Dec 13 08:20:20 2019 New Revision: 355702 URL: https://svnweb.freebsd.org/changeset/base/355702 Log: loader: vdisk dereference after free print out the information and then free the memory used. MFC after: 1 week Modified: head/stand/common/vdisk.c Modified: head/stand/common/vdisk.c ============================================================================== --- head/stand/common/vdisk.c Fri Dec 13 06:54:41 2019 (r355701) +++ head/stand/common/vdisk.c Fri Dec 13 08:20:20 2019 (r355702) @@ -229,10 +229,10 @@ command_unmapvd(int argc, char *argv[]) } STAILQ_REMOVE(&vdisk_list, vd, vdisk_info, vdisk_link); - close(vd->vdisk_fd); + (void) close(vd->vdisk_fd); + printf("%s (%s) unmapped\n", argv[1], vd->vdisk_path); free(vd->vdisk_path); free(vd); - printf("%s (%s) unmapped\n", argv[1], vd->vdisk_path); return (CMD_OK); }
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201912130820.xBD8KLO5064368>