dm: fix some possible memory leak

free memory allocated by strdup()

Tracked-On: #3395
Signed-off-by: Tianhua Sun <tianhuax.s.sun@intel.com>
Reviewed-by: Yonghua Huang <yonghua.huang@intel.com>
This commit is contained in:
Tianhua Sun 2019-07-04 09:22:52 +08:00 committed by ACRN System Integration
parent 304ae38161
commit b96a3555bc
1 changed files with 1 additions and 1 deletions

View File

@ -660,7 +660,7 @@ blockif_open(const char *optstr, const char *ident)
if (size < DEV_BSIZE || (size & (DEV_BSIZE - 1))) { if (size < DEV_BSIZE || (size & (DEV_BSIZE - 1))) {
WPRINTF(("%s size not corret, should be multiple of %d\n", WPRINTF(("%s size not corret, should be multiple of %d\n",
nopt, DEV_BSIZE)); nopt, DEV_BSIZE));
return 0; goto err;
} }
psectsz = sbuf.st_blksize; psectsz = sbuf.st_blksize;
} }