free(h->jpg_image->data);
h->jpg_image->data = NULL;
h->pnm_image->size = 0;
- free(h->pnm_image->data);
- h->pnm_image->data = NULL;
return SANE_STATUS_EOF;
}
{
int length = 0;
handler* h = init_handler();
- h->pnm_image->data = malloc(sizeof(char));;
+ h->pnm_image->data = malloc(sizeof(char));
h->pnm_image->size = 0;
char* dataptr = malloc(sizeof(char));
assert_int_equal(status, SANE_STATUS_EOF);
+ free(h->pnm_image->data);
+ h->pnm_image->data = NULL;
free(dataptr);
dataptr = NULL;
free_handler(h);
dataptr = NULL;
free(length);
length = NULL;
+ free(h->pnm_image->data);
+ h->pnm_image->data = NULL;
free_handler(h);
h = NULL;
}
dataptr = NULL;
free(length);
length = NULL;
+ free(h->pnm_image->data);
+ h->pnm_image->data = NULL;
free_handler(h);
h = NULL;
}
\ No newline at end of file