summaryrefslogtreecommitdiff
path: root/src/video_out/video_out_vidix.c
diff options
context:
space:
mode:
authorMichael Roitzsch <mroi@users.sourceforge.net>2003-10-31 17:25:20 +0000
committerMichael Roitzsch <mroi@users.sourceforge.net>2003-10-31 17:25:20 +0000
commit68fb5107a56d7efcf82a7c8015fbc0f39434f056 (patch)
treea922d23615b9624900107d5943b0b123b073553d /src/video_out/video_out_vidix.c
parent1fbd6d1d81d24259a20ce2bcd77687bd69e8e7fd (diff)
downloadxine-lib-68fb5107a56d7efcf82a7c8015fbc0f39434f056.tar.gz
xine-lib-68fb5107a56d7efcf82a7c8015fbc0f39434f056.tar.bz2
First check the pointers on NULL values, then memset;
patch provided by Chris Rankin CVS patchset: 5650 CVS date: 2003/10/31 17:25:20
Diffstat (limited to 'src/video_out/video_out_vidix.c')
-rw-r--r--src/video_out/video_out_vidix.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/video_out/video_out_vidix.c b/src/video_out/video_out_vidix.c
index fe422b823..07de45ee1 100644
--- a/src/video_out/video_out_vidix.c
+++ b/src/video_out/video_out_vidix.c
@@ -17,7 +17,7 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
*
- * $Id: video_out_vidix.c,v 1.49 2003/10/23 15:17:07 mroi Exp $
+ * $Id: video_out_vidix.c,v 1.50 2003/10/31 17:25:20 mroi Exp $
*
* video_out_vidix.c
*
@@ -386,11 +386,12 @@ static vo_frame_t *vidix_alloc_frame (vo_driver_t *this_gen) {
vidix_frame_t *frame ;
frame = (vidix_frame_t *) malloc (sizeof (vidix_frame_t));
- memset (frame, 0, sizeof(vidix_frame_t));
if (frame==NULL) {
printf ("vidix_alloc_frame: out of memory\n");
+ return NULL;
}
+ memset (frame, 0, sizeof(vidix_frame_t));
pthread_mutex_init (&frame->vo_frame.mutex, NULL);