From 82fe736d151a6aad3b83df50d3ee2a2f59ee0038 Mon Sep 17 00:00:00 2001 From: nick black Date: Mon, 10 Aug 2020 00:04:08 -0400 Subject: [PATCH] qrcode: fix ncvisual memory leak --- src/demo/zoo.c | 1 + src/lib/fill.c | 1 + 2 files changed, 2 insertions(+) diff --git a/src/demo/zoo.c b/src/demo/zoo.c index fc15ef3a2..1dbab8b28 100644 --- a/src/demo/zoo.c +++ b/src/demo/zoo.c @@ -146,6 +146,7 @@ draw_background(struct notcurses* nc){ return -1; } ncplane_greyscale(n); + ncvisual_destroy(ncv); } return 0; } diff --git a/src/lib/fill.c b/src/lib/fill.c index 15844aa2f..6a56dcc64 100644 --- a/src/lib/fill.c +++ b/src/lib/fill.c @@ -617,6 +617,7 @@ int ncplane_qrcode(ncplane* n, ncblitter_e blitter, int* ymax, } ncvisual_geom(n->nc, ncv, &vopts, NULL, NULL, &yscale, &xscale); } + ncvisual_destroy(ncv); } } free(src);