X-Git-Url: https://git.octo.it/?a=blobdiff_plain;f=src%2Foracle.c;h=1332da273a7db95427b0476131a0d37edbe23e0e;hb=77460335ec305aa4fbd8218c6e5c1c849fbef9c0;hp=145fc1f4ec4dd4bdb25b6799cec21f8f1e450439;hpb=f6fa5e18f901664a445699b54cf0afe5a3078176;p=collectd.git diff --git a/src/oracle.c b/src/oracle.c index 145fc1f4..1332da27 100644 --- a/src/oracle.c +++ b/src/oracle.c @@ -568,11 +568,15 @@ static int o_read_database_query (o_database_t *db, /* {{{ */ &column_name, &column_name_length, OCI_ATTR_NAME, oci_error); if (status != OCI_SUCCESS) { + OCIDescriptorFree (oci_param, OCI_DTYPE_PARAM); o_report_error ("o_read_database_query", "OCIAttrGet (OCI_ATTR_NAME)", oci_error); continue; } + OCIDescriptorFree (oci_param, OCI_DTYPE_PARAM); + oci_param = NULL; + /* Copy the name to column_names. Warning: The ``string'' returned by OCI * may not be null terminated! */ memset (column_names[i], 0, DATA_MAX_NAME_LEN); @@ -750,6 +754,7 @@ static int o_shutdown (void) /* {{{ */ } OCIHandleFree (oci_env, OCI_HTYPE_ENV); + oci_env = NULL; udb_query_free (queries, queries_num); queries = NULL;