diff --git a/motion.c b/motion.c index 1bf0e267..9993b9a1 100644 --- a/motion.c +++ b/motion.c @@ -1018,6 +1018,9 @@ static void motion_cleanup(struct context *cnt) free(cnt->imgs.smartmask_buffer); cnt->imgs.smartmask_buffer = NULL; + if (cnt->imgs.mask) free(cnt->imgs.mask); + cnt->imgs.mask = NULL; + free(cnt->imgs.common_buffer); cnt->imgs.common_buffer = NULL; diff --git a/picture.c b/picture.c index 7ca4d7e2..79c52071 100644 --- a/picture.c +++ b/picture.c @@ -1018,7 +1018,8 @@ unsigned char *get_pgm(FILE *picture, int width, int height) /* Resize mask if required */ if (mask_width != width || mask_height != height) { - MOTION_LOG(NTC, TYPE_ALL, NO_ERRNO, "%s: Mask needs resizing from %dx%d to %dx%d", + MOTION_LOG(WRN, TYPE_ALL, NO_ERRNO, "%s: The mask file specified is not the same size as image from camera."); + MOTION_LOG(WRN, TYPE_ALL, NO_ERRNO, "%s: Attempting to resize mask image from %dx%d to %dx%d", mask_width, mask_height, width, height); resized_image = mymalloc(width * height);