PengZheng commented on code in PR #781:
URL: https://github.com/apache/celix/pull/781#discussion_r1918255389


##########
bundles/http_admin/http_admin/src/activator.c:
##########
@@ -97,7 +96,12 @@ static int http_admin_start(http_admin_activator_t *act, 
celix_bundle_context_t
 
     for(long port = prop_port_min; act->httpManager == NULL && port <= 
prop_port_max; port++) {
         char *port_str;
-        asprintf(&port_str, "%li", port);
+        rc= asprintf(&port_str, "%li", port);
+        if(rc < 0 || port_str == NULL) {
+            celix_bundleContext_log(ctx, CELIX_LOG_LEVEL_ERROR, "Cannot 
allocate memory for port string.");
+            free(httpRoot);

Review Comment:
   Is it double-free?



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: dev-unsubscr...@celix.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org

Reply via email to