sam.c: fix incorrect check of talloc_new() allocation