projects
/
experiments
/
leptonica.git
/ commitdiff
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(from parent 1:
a04c47a
)
Check return value of pixWrite()
master
author
Antonio Ospite <ospite@studenti.unina.it>
Sat, 14 Sep 2013 15:28:13 +0000
(17:28 +0200)
committer
Antonio Ospite <ospite@studenti.unina.it>
Sat, 14 Sep 2013 15:28:13 +0000
(17:28 +0200)
leptonica-projective-transform.c
patch
|
blob
|
history
diff --git
a/leptonica-projective-transform.c
b/leptonica-projective-transform.c
index
6035526
..
d89b4df
100644
(file)
--- a/
leptonica-projective-transform.c
+++ b/
leptonica-projective-transform.c
@@
-97,10
+97,15
@@
int main(int argc, char *argv[])
goto out_free_cropped_image;
}
- pixWrite("transformed_image.jpg", transformed_image, IFF_JFIF_JPEG);
+ ret = pixWrite("transformed_image.jpg", transformed_image, IFF_JFIF_JPEG);
+ if (ret != 0) {
+ ret = -EINVAL;
+ goto cleanup;
+ }
ret = 0;
+cleanup:
pixDestroy(&transformed_image);
out_free_cropped_image:
pixDestroy(&cropped_image);