mirror of
https://git.code.sf.net/p/zint/code
synced 2025-12-18 10:27:09 +00:00
Fix various memory leaks
Bugfixes thanks to Alex Haley <ahaley42@users.sf.net>
This commit is contained in:
@@ -36,10 +36,10 @@
|
||||
#include "common.h"
|
||||
#include "bmp.h" /* Bitmap header structure */
|
||||
#include <math.h>
|
||||
#ifdef _MSC_VER
|
||||
#include <io.h>
|
||||
#include <fcntl.h>
|
||||
#endif
|
||||
#ifdef _MSC_VER
|
||||
#include <io.h>
|
||||
#include <fcntl.h>
|
||||
#endif
|
||||
|
||||
#define SSET "0123456789ABCDEF"
|
||||
|
||||
@@ -50,8 +50,8 @@ int bmp_pixel_plot(struct zint_symbol *symbol, int image_height, int image_width
|
||||
unsigned int data_size;
|
||||
unsigned char *bitmap_file_start, *bmp_posn;
|
||||
FILE *bmp_file;
|
||||
bitmap_file_header_t file_header;
|
||||
bitmap_info_header_t info_header;
|
||||
bitmap_file_header_t file_header;
|
||||
bitmap_info_header_t info_header;
|
||||
|
||||
switch (rotate_angle) {
|
||||
case 0:
|
||||
@@ -236,5 +236,6 @@ int bmp_pixel_plot(struct zint_symbol *symbol, int image_height, int image_width
|
||||
fwrite(bitmap_file_start, file_header.file_size, 1, bmp_file);
|
||||
fclose(bmp_file);
|
||||
|
||||
free(bitmap_file_start);
|
||||
return 0;
|
||||
}
|
||||
Reference in New Issue
Block a user