diff options
author | Jonathan Gray <jsg@cvs.openbsd.org> | 2017-08-28 23:45:11 +0000 |
---|---|---|
committer | Jonathan Gray <jsg@cvs.openbsd.org> | 2017-08-28 23:45:11 +0000 |
commit | 74bf4c6f842d9fcbe645f9659bbb5ccceaf3942f (patch) | |
tree | c5e25f0b9402a93a1deaaea778d0997ef80c6437 /sys | |
parent | 54b33e6647ccb548b76ccec31205f1e6297cc4d8 (diff) |
Fix a memory leak in an error path. Coverity CID 1453042.
ok visa@
Diffstat (limited to 'sys')
-rw-r--r-- | sys/dev/sdmmc/sdmmc_io.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/sys/dev/sdmmc/sdmmc_io.c b/sys/dev/sdmmc/sdmmc_io.c index fa5b9d86c4c..f84a759efab 100644 --- a/sys/dev/sdmmc/sdmmc_io.c +++ b/sys/dev/sdmmc/sdmmc_io.c @@ -1,4 +1,4 @@ -/* $OpenBSD: sdmmc_io.c,v 1.28 2017/04/06 17:00:53 deraadt Exp $ */ +/* $OpenBSD: sdmmc_io.c,v 1.29 2017/08/28 23:45:10 jsg Exp $ */ /* * Copyright (c) 2006 Uwe Stuehler <uwe@openbsd.org> @@ -137,7 +137,7 @@ sdmmc_io_scan(struct sdmmc_softc *sc) sf0->number = 0; if (sdmmc_set_relative_addr(sc, sf0) != 0) { printf("%s: can't set I/O RCA\n", DEVNAME(sc)); - SET(sf0->flags, SFF_ERROR); + sdmmc_function_free(sf0); return; } sc->sc_fn0 = sf0; |