diff --git a/src/generic/evas/gst/main.c b/src/generic/evas/gst/main.c index d9e6fa786c..915622705d 100644 --- a/src/generic/evas/gst/main.c +++ b/src/generic/evas/gst/main.c @@ -272,14 +272,18 @@ main(int argc, char **argv) { if (shm_fd >= 0) { - printf("shmfile %s\n", shmfile); + printf("shmfile %s\n", shmfile); } else { // could also to "tmpfile %s\n" like shmfile but just // a mmaped tmp file on the system printf("data\n"); - fwrite(data, width * height * sizeof(DATA32), 1, stdout); + if (fwrite(data, width * height * sizeof(DATA32), 1, stdout) != 1) + { + shm_free(); + return -1; + } } shm_free(); } diff --git a/src/generic/evas/gst/main_0_10.c b/src/generic/evas/gst/main_0_10.c index 3e0c02b823..8e383334f6 100644 --- a/src/generic/evas/gst/main_0_10.c +++ b/src/generic/evas/gst/main_0_10.c @@ -258,14 +258,18 @@ main(int argc, char **argv) { if (shm_fd >= 0) { - printf("shmfile %s\n", shmfile); + printf("shmfile %s\n", shmfile); } else { // could also to "tmpfile %s\n" like shmfile but just // a mmaped tmp file on the system printf("data\n"); - fwrite(data, width * height * sizeof(DATA32), 1, stdout); + if (fwrite(data, width * height * sizeof(DATA32), 1, stdout) != 1) + { + shm_free(); + return -1; + } } shm_free(); }