diff options
author | Pali Rohár <pali.rohar@gmail.com> | 2013-01-14 19:30:10 +0100 |
---|---|---|
committer | Pali Rohár <pali.rohar@gmail.com> | 2013-01-14 19:30:10 +0100 |
commit | a6ec475a92ebfb9ab42685cb63b42a39656705ab (patch) | |
tree | e18051a5a7514511a72a52cb6dc57965c1b21d28 /logotool | |
parent | 783222ed007f93d16bfb224df3d10ddb47bf4a74 (diff) | |
parent | a6ef73359c0e0537ebf83795ebacbbfaee2c9c28 (diff) | |
download | 0xFFFF-legacy.tar.bz2 |
Merge branch 'pvc' into legacylegacy
Diffstat (limited to 'logotool')
-rw-r--r-- | logotool/compress.c | 1 | ||||
-rw-r--r-- | logotool/rgb2yuv.c | 2 | ||||
-rw-r--r-- | logotool/uncompress.c | 1 |
3 files changed, 4 insertions, 0 deletions
diff --git a/logotool/compress.c b/logotool/compress.c index c65158c..cb32265 100644 --- a/logotool/compress.c +++ b/logotool/compress.c @@ -60,6 +60,7 @@ int compress_image(char *srcf, char *dstf, int w, int h) fdout = open( dstf, O_TRUNC | O_CREAT | O_WRONLY , 0660 ); if (fdout == -1) { printf("Cannot open file '%s' for writing\n", dstf); + fclose(fd); return 1; } diff --git a/logotool/rgb2yuv.c b/logotool/rgb2yuv.c index b3f2143..4c3a268 100644 --- a/logotool/rgb2yuv.c +++ b/logotool/rgb2yuv.c @@ -107,5 +107,7 @@ int rgb2yuv(char *from, char *to, int width, int height) for ( i = 0 ; i < height ; i+=2 ) for ( j = 0; j < width ; j +=2 ) write ( fout,&dstV[j+(i*width)], 1); + + free(dstV); free(dstU); free(dstY); free(src); return 1; } diff --git a/logotool/uncompress.c b/logotool/uncompress.c index 7fb8b10..72b1fdd 100644 --- a/logotool/uncompress.c +++ b/logotool/uncompress.c @@ -119,5 +119,6 @@ int uncompress_image(char *srcf, char *dstf) //printf("logotool -w %d -h %d -v %s\n", width, height, dstf); printf("eval PATH=$PWD:$PATH logotool -w %d -h %d -m %s\n", width, height, dstf); + free(dst); free(src); return 0; } |