Skip to content

Commit 3059174

Browse files
cursoragentmyungjoo
andcommitted
fix(training-offloading): free previous receiver pipeline description
Bug: _ml_service_training_offloading_prepare_receiver() reassigned receiver_pipe with g_strdup() on each prepare call without freeing the previous string. Fix: clear receiver_pipe before storing the new pipeline description. Signed-off-by: Cursor Agent <cursoragent@cursor.com> Co-authored-by: MyungJoo Ham <myungjoo.ham@samsung.com>
1 parent 5b5c3fb commit 3059174

1 file changed

Lines changed: 1 addition & 0 deletions

File tree

c/src/ml-api-service-training-offloading.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -715,6 +715,7 @@ _ml_service_training_offloading_prepare_receiver (ml_service_s * mls,
715715

716716
pipe = json_object_get_object_member (pipeline_obj, "pipeline");
717717
if (json_object_has_member (pipe, "description")) {
718+
g_clear_pointer (&training_s->receiver_pipe, g_free);
718719
training_s->receiver_pipe =
719720
g_strdup (_ml_service_get_json_string_member (pipe, "description"));
720721
} else {

0 commit comments

Comments
 (0)