diff options
author | Tor Andersson <tor.andersson@artifex.com> | 2018-02-14 12:32:53 +0100 |
---|---|---|
committer | Tor Andersson <tor.andersson@artifex.com> | 2018-02-27 12:58:56 +0100 |
commit | b04a5e3de89c54df0d971a3d5ca8727de994d08c (patch) | |
tree | b28b75663097b3fd6bb43e6a8e0e9415f726f21a /platform/x11/pdfapp.c | |
parent | c2ff52c4821922f9288cc2010e937b2a3a5488f1 (diff) | |
download | mupdf-b04a5e3de89c54df0d971a3d5ca8727de994d08c.tar.xz |
Use text encoding for pdf_choice_widget options and values.
Adds a requirement on the caller to free the returned strings.
Diffstat (limited to 'platform/x11/pdfapp.c')
-rw-r--r-- | platform/x11/pdfapp.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/platform/x11/pdfapp.c b/platform/x11/pdfapp.c index 9ded94b3..efa7f460 100644 --- a/platform/x11/pdfapp.c +++ b/platform/x11/pdfapp.c @@ -1684,6 +1684,8 @@ void pdfapp_onmouse(pdfapp_t *app, int x, int y, int btn, int modifiers, int sta fz_var(opts); fz_var(vals); + fz_var(nopts); + fz_var(nvals); fz_try(ctx) { @@ -1703,7 +1705,12 @@ void pdfapp_onmouse(pdfapp_t *app, int x, int y, int btn, int modifiers, int sta } fz_always(ctx) { + int i; + for (i=0; i < nopts; ++i) + fz_free(ctx, opts[i]); fz_free(ctx, opts); + for (i=0; i < nvals; ++i) + fz_free(ctx, vals[i]); fz_free(ctx, vals); } fz_catch(ctx) |