On 2021-10-13 07:53, Nick wrote: > Since I saw there were some new patches, e.g., procd, fixing > blob_buf_free() calls. > I asked several months ago: "Should you call blob_buf_free() after > calling blob_buf_init()?" > https://forum.openwrt.org/t/should-you-call-blob-buf-free-after-calling-blob-buf-init > > I did not receive any answer. I think blob_buf_init() is freeing memory > if it is the same buf? > Any suggestions how to use blob_buf_free? If a buffer was already allocated, blob_buf_init reuses it. You can keep reusing it as many times as you want. You only need to call blob_buf_free if you explicitly want to free the buffer memory (e.g. on exit, or if the blob_buf is on stack)
- Felix _______________________________________________ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/mailman/listinfo/openwrt-devel