refcount: partial increments count as increments
This was_inced() function is used to detect frees vs non-frees. If we
decrement a refcounted variable and we bumped the refcount then call free
it doesn't actually free it, it just decrements the refcount. But if we
didn't increment it then it is a free.
So what about if it's both incremented and not-incremented? Better to
treat it as incremented to avoid false positives and because something
complicated is probably happening. For example, if a pointer was passed
in then we increment it but otherwise we allocate our own. At the end we
decrement the passed in pointer or we free our pointer. In the original
code we recorded that this function frees the parameter which is not
correct.
Signed-off-by: Dan Carpenter <dan.carpenter@linaro.org>