libmicrohttpd
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [libmicrohttpd] MHD_destroy_post_processor() is unsafe


From: Christian Grothoff
Subject: Re: [libmicrohttpd] MHD_destroy_post_processor() is unsafe
Date: Thu, 24 Nov 2011 15:12:59 +0100
User-agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.2.23) Gecko/20111010 Icedove/3.1.15

On 11/24/2011 03:10 PM, Andreas Wehrmann wrote:
On 11/24/2011 03:01 PM, Christian Grothoff wrote:
Well, if creating the PP failed, why would you try to destroy it? ;-).

I don't think that any function has to work nicely when being called
with NULL (unless specified that it should accept NULL, of course).

Happy hacking,

Christian


That's easy: Because I continued to handle the request although creating
th PP failed...
Yes I know, my mistake :-)

But then:
Why do you check whether PP is not NULL in MHD_post_process()?
Same problem there.

It may be confusing to some users that some functions are "safe" and
some are not,
I think the library should be clear on this.

Consistency is a good argument, I'll add the check (removing checks elsewhere is again a bad idea because technically it might break existing, working code).

Happy hacking,

Christian



reply via email to

[Prev in Thread] Current Thread [Next in Thread]