From c02f534047b35e3db4b300264a0abb790e9121af Mon Sep 17 00:00:00 2001 From: Leo Howell Date: Sun, 15 Nov 2009 10:37:45 +0900 Subject: Fix memory leak in qrgen --- lpg/libqr/qrgen.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'lpg/libqr/qrgen.c') diff --git a/lpg/libqr/qrgen.c b/lpg/libqr/qrgen.c index ad53125..b95db0a 100644 --- a/lpg/libqr/qrgen.c +++ b/lpg/libqr/qrgen.c @@ -41,10 +41,10 @@ struct qr_code * create(int version, } code = qr_code_create(data); + qr_free_data(data); if (!code) { perror("Failed to create code"); - qr_free_data(data); exit(2); } -- cgit v1.2.3-70-g09d2