aboutsummaryrefslogtreecommitdiff
path: root/src/nad_init.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/nad_init.c')
-rw-r--r--src/nad_init.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/nad_init.c b/src/nad_init.c
index 0a28e200..a9082f8f 100644
--- a/src/nad_init.c
+++ b/src/nad_init.c
@@ -224,7 +224,7 @@ struct CTABLE *nad_ctable2_init( projCtx ctx, PAFile fid )
ct = (struct CTABLE *) pj_malloc(sizeof(struct CTABLE));
if( ct == NULL )
{
- pj_ctx_set_errno( ctx, -38 );
+ pj_ctx_set_errno( ctx, ENOMEM );
return NULL;
}
@@ -241,6 +241,7 @@ struct CTABLE *nad_ctable2_init( projCtx ctx, PAFile fid )
|| ct->lim.phi < 1 || ct->lim.phi > 100000 )
{
pj_ctx_set_errno( ctx, -38 );
+ pj_dalloc( ct );
return NULL;
}