Skip to content

Commit b96a355

Browse files
tianhuasacrnsi
authored andcommitted
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>
1 parent 304ae38 commit b96a355

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

devicemodel/hw/block_if.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -660,7 +660,7 @@ blockif_open(const char *optstr, const char *ident)
660660
if (size < DEV_BSIZE || (size & (DEV_BSIZE - 1))) {
661661
WPRINTF(("%s size not corret, should be multiple of %d\n",
662662
nopt, DEV_BSIZE));
663-
return 0;
663+
goto err;
664664
}
665665
psectsz = sbuf.st_blksize;
666666
}

0 commit comments

Comments
 (0)