Home
last modified time | relevance | path

Searched hist:cb3199681eb2ed53850595d374e4989dbd62a3fa (Results 1 – 1 of 1) sorted by relevance

/haiku/src/add-ons/kernel/network/protocols/udp/
H A Dudp.cppe94ea7bc22ad2500b53be44765c7acaba8f392a0 Wed Dec 15 17:40:59 UTC 2021 Augustin Cavalier <waddlesplash@gmail.com> UDP: Fix double-reference of DomainSupport.

PulkoMandy in cb3199681eb2ed53850595d374e4989dbd62a3fa changed
the _GetDomainSupport functions to always Ref() the the object.
However, that means in the case of the second _GetDomainSupport
function, which is implemented in terms of the first, we should
not call Ref() as this will create a double-reference.

Fixes a memory leak.

Change-Id: Ib82b2dadc0c8cc8d8f95efcffeb2430ac602a0a9
Reviewed-on: https://review.haiku-os.org/c/haiku/+/4791
Reviewed-by: Adrien Destugues <pulkomandy@gmail.com>
cb3199681eb2ed53850595d374e4989dbd62a3fa Fri May 14 10:04:08 UTC 2021 Adrien Destugues <pulkomandy@pulkomandy.tk> UDP: apply review comments from hrev51603

I found this at the bottom of my TODO list…

- UdpDomainSupport methods were referring to the object through a static
variable when they could just use the "this" object instead.
- Use BAutoDeleter to simplify the code a little
- Style problem (missing != NULL in pointer check)
- Move referencing of domainSupport in _GetDomainSupport instead of
OpenEndpoint. This way the two _GetDomainSupport methods both return
an already referenced object

Thanks to Axel for the code review and sorry for the super late reply.

Change-Id: Ic50ebb1a63a203d5aa393d28f4631c345acacc79
Reviewed-on: https://review.haiku-os.org/c/haiku/+/3908
Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org>
Reviewed-by: waddlesplash <waddlesplash@gmail.com>