From ef5dfb7febd8881158e493451a27a2500ced14cb Mon Sep 17 00:00:00 2001 From: Matthias Vogelgesang Date: Fri, 18 Mar 2011 11:10:00 +0100 Subject: Initialize all camera fields with NULL to catch errors early on --- src/cameras/pco.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/cameras/pco.c') diff --git a/src/cameras/pco.c b/src/cameras/pco.c index 59c689d..3801157 100644 --- a/src/cameras/pco.c +++ b/src/cameras/pco.c @@ -250,7 +250,7 @@ uint32_t uca_pco_init(struct uca_camera **cam, struct uca_grabber *grabber) return UCA_ERR_CAM_NOT_FOUND; } - struct uca_camera *uca = (struct uca_camera *) malloc(sizeof(struct uca_camera)); + struct uca_camera *uca = uca_cam_new(); uca->user = pco; uca->grabber = grabber; uca->grabber->asynchronous = true; -- cgit v1.2.3