diff options
author | Matthias Vogelgesang <matthias.vogelgesang@kit.edu> | 2012-05-10 16:26:03 +0200 |
---|---|---|
committer | Matthias Vogelgesang <matthias.vogelgesang@kit.edu> | 2012-05-10 16:26:03 +0200 |
commit | 14961a34d7eac8557c3ad982c3d41ce5fbb5470c (patch) | |
tree | fa5201dab8adcc0d9564711b0e20354abc8d8bbd | |
parent | 0a11fdefc495c0f1966f2cefdc8acf8de4475c31 (diff) | |
download | libuca-14961a34d7eac8557c3ad982c3d41ce5fbb5470c.tar.gz libuca-14961a34d7eac8557c3ad982c3d41ce5fbb5470c.tar.bz2 libuca-14961a34d7eac8557c3ad982c3d41ce5fbb5470c.tar.xz libuca-14961a34d7eac8557c3ad982c3d41ce5fbb5470c.zip |
Properly allocate and destroy value array
-rw-r--r-- | src/cameras/uca-pco-camera.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/cameras/uca-pco-camera.c b/src/cameras/uca-pco-camera.c index 677f523..7444744 100644 --- a/src/cameras/uca-pco-camera.c +++ b/src/cameras/uca-pco-camera.c @@ -258,6 +258,7 @@ static guint fill_pixelrates(UcaPcoCameraPrivate *priv) guint err = pco_get_available_pixelrates(priv->pco, rates, &num_rates); GValue val = {0}; g_value_init(&val, G_TYPE_UINT); + priv->pixelrates = g_value_array_new(num_rates); if (err == PCO_NOERROR) { for (gint i = 0; i < num_rates; i++) { @@ -953,6 +954,9 @@ static void uca_pco_camera_finalize(GObject *object) if (priv->vertical_binnings) g_value_array_free(priv->vertical_binnings); + if (priv->pixelrates) + g_value_array_free(priv->pixelrates); + if (priv->fg) { if (priv->fg_mem) Fg_FreeMemEx(priv->fg, priv->fg_mem); @@ -1125,6 +1129,7 @@ static void uca_pco_camera_init(UcaPcoCamera *self) self->priv->pco = NULL; self->priv->horizontal_binnings = NULL; self->priv->vertical_binnings = NULL; + self->priv->pixelrates = NULL; self->priv->camera_description = NULL; self->priv->last_frame = 0; |