Transfer ownership of storage in Splint
问题 Using a simple linked list implementation in C, how do I tell Splint that I am transfer ownership of data ? typedef struct { void* data; /*@null@*/ void* next; } list; static /*@null@*/ list* new_list(/*@notnull@*/ void* data) { list* l; l = malloc(sizeof(list)); if (l == NULL) return NULL; l->next = NULL; l->data = data; return l; } I get this error message: Implicitly temp storage data assigned to implicitly only: list->data = data Temp storage (associated with a formal parameter) is