[Live-devel] May createNewSomething methods return NULL?

Helmut Grohne h.grohne at intenta.de
Tue Sep 13 00:07:56 PDT 2016


On Mon, Sep 12, 2016 at 06:55:53AM -0700, Ross Finlayson wrote:
> This is the *first* thing that you should have told us.  This told me all that I needed to know: That there was a bug in “GenericMediaServer::createNewClientSessionWithId().  It should have checked that the “createNewClientSession()” result was non-NULL before adding it to the hash table.
> 
> I have now installed a new version (2016.09.12) of the “LIVE555 Streaming Media” code that fixes this.

Thank you! It really wasn't clear to me that this was a bug in the
library from the outset. My initial assumption was that I was using it
wrongly. Only when I found that old message (after posting my initial
question on this topic), I figured that maybe it wasn't used wrongly.

Thus I ask you to document which functions may return NULL. If I had
that information at hand, mentioning the issue around
createNewClientSessionWithId would have been the obvious thing to do. In
the absence of that information I had to assume that a NULL return is a
user bug.

Helmut


More information about the live-devel mailing list