uclient-fetch: init_ca_cert: fix memory leak
[project/uclient.git] / uclient-fetch.c
index 1c66ac6d33ae6d5cf24bd8379e7d5233746ca1b5..bbf5eec58d710c6c8e58da0e7a62ea8dd2835559 100644 (file)
@@ -503,6 +503,7 @@ static void init_ca_cert(void)
        glob("/etc/ssl/certs/*.crt", 0, NULL, &gl);
        for (i = 0; i < gl.gl_pathc; i++)
                ssl_ops->context_add_ca_crt_file(ssl_ctx, gl.gl_pathv[i]);
+       globfree(&gl);
 }
 
 static void init_ustream_ssl(void)