diff options
author | Matthias Vogelgesang <matthias.vogelgesang@kit.edu> | 2018-06-26 16:28:20 +0200 |
---|---|---|
committer | Matthias Vogelgesang <matthias.vogelgesang@kit.edu> | 2018-06-26 16:28:20 +0200 |
commit | 2c98501d16f12dc260863f950cb1492a309eb505 (patch) | |
tree | acec98433ab7cf0e2928d8ce146a6f165ca92f18 | |
parent | 1d43a09135be31a2d68afa8e50a665c333ecb084 (diff) | |
download | uca-net-2c98501d16f12dc260863f950cb1492a309eb505.tar.gz uca-net-2c98501d16f12dc260863f950cb1492a309eb505.tar.bz2 uca-net-2c98501d16f12dc260863f950cb1492a309eb505.tar.xz uca-net-2c98501d16f12dc260863f950cb1492a309eb505.zip |
Fix a few minor leaks
-rw-r--r-- | uca-net-camera.c | 4 | ||||
-rw-r--r-- | ucad.c | 1 |
2 files changed, 3 insertions, 2 deletions
diff --git a/uca-net-camera.c b/uca-net-camera.c index 657cccc..c1ad5f0 100644 --- a/uca-net-camera.c +++ b/uca-net-camera.c @@ -568,7 +568,7 @@ uca_net_camera_constructed (GObject *object) priv = UCA_NET_CAMERA_GET_PRIVATE (object); - if (priv->host == NULL || !g_strcmp0 (priv->host, "")) { + if (priv->host == NULL) { const gchar *env; env = g_getenv ("UCA_NET_HOST"); @@ -616,7 +616,7 @@ uca_net_camera_class_init (UcaNetCameraClass *klass) g_param_spec_string ("host", "Host name and optional port", "Host name and optional port", - "", + "localhost", G_PARAM_READWRITE | G_PARAM_CONSTRUCT); for (guint i = PROP_0 + 1; i < N_BASE_PROPERTIES; i++) @@ -230,6 +230,7 @@ handle_get_property_request (GSocketConnection *connection, UcaCamera *camera, g reply.type = request->type; strncpy (reply.property_value, g_value_get_string (&str_value), sizeof (reply.property_value)); send_reply (connection, &reply, sizeof (reply), error); + g_value_unset (&str_value); } static void |