HI Vu,
ACK
-AVM
On 8/16/2016 3:39 PM, Vu Minh Nguyen wrote:
> osaf/services/saf/logsv/lgs/lgs_evt.cc | 4 +++-
> 1 files changed, 3 insertions(+), 1 deletions(-)
>
>
> Assertion failed in log_stream_close() because the caller did not check NULL
> before calling the function.
>
> This patch adds the protection.
>
> diff --git a/osaf/services/saf/logsv/lgs/lgs_evt.cc
> b/osaf/services/saf/logsv/lgs/lgs_evt.cc
> --- a/osaf/services/saf/logsv/lgs/lgs_evt.cc
> +++ b/osaf/services/saf/logsv/lgs/lgs_evt.cc
> @@ -166,7 +166,9 @@ int lgs_client_delete(uint32_t client_id
> lgs_stream_list_t *tmp_rec;
> log_stream_t *stream = log_stream_get_by_id(cur_rec->stream_id);
> TRACE_4("client_id: %u, REMOVE stream id: %u",
> client->client_id, cur_rec->stream_id);
> - log_stream_close(&stream, &closetime);
> + if (stream != NULL) {
> + log_stream_close(&stream, &closetime);
> + }
> tmp_rec = cur_rec->next;
> free(cur_rec);
> cur_rec = tmp_rec;
------------------------------------------------------------------------------
_______________________________________________
Opensaf-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/opensaf-devel