Skip to content

Commit 5e99651

Browse files
committed
messages BUGFIX properly free action reply with output
1 parent 0f352f4 commit 5e99651

File tree

2 files changed

+4
-3
lines changed

2 files changed

+4
-3
lines changed

src/messages_p.h

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,11 @@
11
/**
22
* @file messages_p.h
33
* @author Radek Krejci <[email protected]>
4+
* @author Michal Vasko <[email protected]>
45
* @brief libnetconf2's private functions and structures of NETCONF messages.
56
*
67
* @copyright
7-
* Copyright (c) 2021 CESNET, z.s.p.o.
8+
* Copyright (c) 2021 - 2025 CESNET, z.s.p.o.
89
*
910
* This source code is licensed under BSD 3-Clause License (the "License").
1011
* You may not use this file except in compliance with the License.
@@ -34,7 +35,7 @@ struct nc_server_reply {
3435

3536
struct nc_server_reply_data {
3637
NC_RPL type;
37-
struct lyd_node *data;
38+
struct lyd_node *data; /**< always points to the operation, for both RPCs and actions */
3839
int free;
3940
NC_WD_MODE wd;
4041
};

src/messages_server.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -787,7 +787,7 @@ nc_server_reply_free(struct nc_server_reply *reply)
787787
case NC_RPL_DATA:
788788
data_rpl = (struct nc_server_reply_data *)reply;
789789
if (data_rpl->free) {
790-
lyd_free_siblings(data_rpl->data);
790+
lyd_free_all(data_rpl->data);
791791
}
792792
break;
793793
case NC_RPL_OK:

0 commit comments

Comments
 (0)