diff options
| author | Even Rouault <even.rouault@spatialys.com> | 2017-08-30 10:19:59 +0200 |
|---|---|---|
| committer | Even Rouault <even.rouault@spatialys.com> | 2017-08-30 10:19:59 +0200 |
| commit | 9b664865a2926568440de57f4d3f5a64e0cee6dc (patch) | |
| tree | f68b3d68b8e7bad01753fd380c86bfe0800336e6 /src | |
| parent | d5c5a70ef763375c9c57cf701c73532a9cdaf802 (diff) | |
| download | PROJ-9b664865a2926568440de57f4d3f5a64e0cee6dc.tar.gz PROJ-9b664865a2926568440de57f4d3f5a64e0cee6dc.zip | |
urm5: fix memory leaks in error code paths of initialization. Fixes https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=3235. Credit to OSS Fuzz
Diffstat (limited to 'src')
| -rw-r--r-- | src/PJ_urm5.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/PJ_urm5.c b/src/PJ_urm5.c index 9d904fc7..4edb4215 100644 --- a/src/PJ_urm5.c +++ b/src/PJ_urm5.c @@ -47,11 +47,11 @@ PJ *PROJECTION(urm5) { Q->n = pj_param(P->ctx, P->params, "dn").f; if (Q->n <= 0. || Q->n > 1.) { proj_errno_set(P, PJD_ERR_N_OUT_OF_RANGE); - return freeup_new(0); + return freeup_new(P); } } else { proj_errno_set(P, PJD_ERR_N_OUT_OF_RANGE); - return freeup_new(0); + return freeup_new(P); } Q->q3 = pj_param(P->ctx, P->params, "dq").f / 3.; alpha = pj_param(P->ctx, P->params, "ralpha").f; |
