- When scmirroring_sink_set_ip_and_port called more than twice,
memory leak occured.
- SCMIRRORING_ERROR_OUT_OF_MEMORY should returned if strdup failed.
Signed-off-by: SeokHoon Lee <andy.shlee@samsung.com>
Change-Id: I32aa6c5586fe77fb5de65d074782f2dbfbb354f3
Name: capi-media-screen-mirroring
Summary: A screen mirroring library in Tizen C API
-Version: 0.1.71
+Version: 0.1.72
Release: 0
Group: Multimedia/API
License: Apache-2.0
scmirroring_debug("ip[%s] port[%s]", ip, port);
+ SCMIRRORING_SAFE_FREE(handle->ip);
handle->ip = strdup(ip);
+ scmirroring_retvm_if(handle->ip == NULL, SCMIRRORING_ERROR_OUT_OF_MEMORY, "Out of memory for ip");
+
+ SCMIRRORING_SAFE_FREE(handle->port);
handle->port = strdup(port);
+ scmirroring_retvm_if(handle->port == NULL, SCMIRRORING_ERROR_OUT_OF_MEMORY, "Out of memory for port");
scmirroring_debug_fleave();