comparison tools/gfxconv.c @ 1514:61a5bbaf8d5c

Plug some minor memory leaks in gfxconv.
author Matti Hamalainen <ccr@tnsp.org>
date Fri, 11 May 2018 22:36:21 +0300
parents aa87cb6cf33b
children 0d1cf72fb732
comparison
equal deleted inserted replaced
1513:181163a6dd24 1514:61a5bbaf8d5c
1694 if (res == DMERR_OK) 1694 if (res == DMERR_OK)
1695 optInFormat = FFMT_BITMAP; 1695 optInFormat = FFMT_BITMAP;
1696 else 1696 else
1697 { 1697 {
1698 dmErrorMsg("Could not decode input image: %s.\n", dmErrorStr(res)); 1698 dmErrorMsg("Could not decode input image: %s.\n", dmErrorStr(res));
1699 exit(3); 1699 goto error;
1700 } 1700 }
1701 } 1701 }
1702 1702
1703 if (optInFormat == FFMT_AUTO || optInFormat == FFMT_IMAGE) 1703 if (optInFormat == FFMT_AUTO || optInFormat == FFMT_IMAGE)
1704 { 1704 {
1714 } 1714 }
1715 1715
1716 if (optInFormat == FFMT_AUTO) 1716 if (optInFormat == FFMT_AUTO)
1717 { 1717 {
1718 dmErrorMsg("No input format specified, and could not be determined automatically.\n"); 1718 dmErrorMsg("No input format specified, and could not be determined automatically.\n");
1719 exit(1); 1719 goto error;
1720 } 1720 }
1721 1721
1722 int inFormat = dmGetConvFormat(optInFormat, optInSubFormat), 1722 int inFormat = dmGetConvFormat(optInFormat, optInSubFormat),
1723 outFormat = dmGetConvFormat(optOutFormat, optOutSubFormat); 1723 outFormat = dmGetConvFormat(optOutFormat, optOutSubFormat);
1724 1724