qrcode: fix ncvisual memory leak

This commit is contained in:
nick black 2020-08-10 00:04:08 -04:00
parent 5d08641751
commit 82fe736d15
No known key found for this signature in database
GPG Key ID: 5F43400C21CBFACC
2 changed files with 2 additions and 0 deletions

View File

@ -146,6 +146,7 @@ draw_background(struct notcurses* nc){
return -1;
}
ncplane_greyscale(n);
ncvisual_destroy(ncv);
}
return 0;
}

View File

@ -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);