Skip to content

Commit

Permalink
Fix Resource Leak issue
Browse files Browse the repository at this point in the history
  • Loading branch information
Shubham Vasudeo Desai committed Dec 18, 2024
1 parent ab90c5e commit 2727293
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion lib/rst/interp_float/segmen2d.c
Original file line number Diff line number Diff line change
Expand Up @@ -283,8 +283,10 @@ int IL_interp_segments_2d(
}
else if (segtest == 1) {
if (params->matrix_create(params, data->points,
data->n_points - 1, matrix, indx) < 0)
data->n_points - 1, matrix, indx) < 0) {
G_free(point);
return -1;
}
}
if (!params->cv) {
for (i = 0; i < data->n_points; i++)
Expand Down Expand Up @@ -332,6 +334,7 @@ int IL_interp_segments_2d(
G_free(data->points);
G_free(data);
}
G_free(point);
return 1;
}

Expand Down

0 comments on commit 2727293

Please sign in to comment.