﻿id	summary	reporter	owner	description	type	status	priority	milestone	component	version	severity	resolution	keywords	cc
58	psListRemove should not decrement reference	robert.desonia@…	eugene	"The SDRS states ""When elements are removed from a list with psListRemove, they
must have their reference counters decremented.""

This, however, is not the case, as the return value of psListRemove returns the
element, so the reference is merely transferred back to the user.

Consider the following code:

list = psListAlloc(NULL);
...
psListAdd(list,data,PS_LIST_HEAD);
...
psFree(data); 
// user no longer needs it, though since it is in list, it doesn't actually go away
...
data2 = psListRemove(list,PS_LIST_HEAD); // assume 'data' is still head of list

----

If I decremented the reference in psListRemove, no reference would then exist,
and psListRemove either returns a NULL or invalid pointer.

In other words, psListRemove transfers the reference from the list to the user
via the return value and no dereferencing actually occurs there.

-rdd"	defect	closed	high		PSLib SDRS	unspecified	normal	fixed		
