From: Johan H. <joh...@no...> - 2005-08-22 10:57:44
|
Hi, I was valgrinding my obex app and bumped into a memory leak in openobex. When sending data as a stream I call OBEX_ObjectAddHeader(handle, object, OBEX_HDR_BODY, hv, 0, OBEX_FL_STREAM_START); This makes a call to obex_object_addheader which in turn calls malloc at obex_object.c:186, However, after the transfer is complete the memory is never free'd by openobex. The attached patch fixes this leak by freeing the memory in send_stream() after the header is removed from tx_headerq. Johan |