Browse Source

clean up styling

v1.x
Tj Holowaychuk 13 years ago
parent
commit
323e24ba42
  1. 3
      src/Image.cc

3
src/Image.cc

@ -613,6 +613,7 @@ Image::loadJPEGFromBuffer(uint8_t *buf, unsigned len) {
// Data alloc
int stride = width * 4;
uint8_t *data = (uint8_t *) malloc(width * height * 4);
if (!data) {
jpeg_finish_decompress(&info);
jpeg_destroy_decompress(&info);
@ -683,6 +684,7 @@ Image::loadJPEG(FILE *stream) {
// Data alloc
int stride = width * 4;
uint8_t *data = (uint8_t *) malloc(width * height * 4);
if (!data) {
fclose(stream);
jpeg_finish_decompress(&info);
@ -691,6 +693,7 @@ Image::loadJPEG(FILE *stream) {
}
uint8_t *src = (uint8_t *) malloc(width * 3);
if (!src) {
free(data);
fclose(stream);

Loading…
Cancel
Save