Return-Path: X-Original-To: apmail-incubator-celix-commits-archive@minotaur.apache.org Delivered-To: apmail-incubator-celix-commits-archive@minotaur.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 0C8D71145B for ; Wed, 4 Jun 2014 13:46:40 +0000 (UTC) Received: (qmail 43006 invoked by uid 500); 4 Jun 2014 13:46:39 -0000 Delivered-To: apmail-incubator-celix-commits-archive@incubator.apache.org Received: (qmail 42979 invoked by uid 500); 4 Jun 2014 13:46:39 -0000 Mailing-List: contact celix-commits-help@incubator.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: celix-dev@incubator.apache.org Delivered-To: mailing list celix-commits@incubator.apache.org Received: (qmail 42972 invoked by uid 99); 4 Jun 2014 13:46:39 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 04 Jun 2014 13:46:39 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=5.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.4] (HELO eris.apache.org) (140.211.11.4) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 04 Jun 2014 13:46:38 +0000 Received: from eris.apache.org (localhost [127.0.0.1]) by eris.apache.org (Postfix) with ESMTP id B90272388994; Wed, 4 Jun 2014 13:46:18 +0000 (UTC) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r1600208 - /incubator/celix/trunk/utils/private/src/linked_list.c Date: Wed, 04 Jun 2014 13:46:18 -0000 To: celix-commits@incubator.apache.org From: pnoltes@apache.org X-Mailer: svnmailer-1.0.9 Message-Id: <20140604134618.B90272388994@eris.apache.org> X-Virus-Checked: Checked by ClamAV on apache.org Author: pnoltes Date: Wed Jun 4 13:46:18 2014 New Revision: 1600208 URL: http://svn.apache.org/r1600208 Log: CELIX-119: Fixed bug in linkedList_destroy Modified: incubator/celix/trunk/utils/private/src/linked_list.c Modified: incubator/celix/trunk/utils/private/src/linked_list.c URL: http://svn.apache.org/viewvc/incubator/celix/trunk/utils/private/src/linked_list.c?rev=1600208&r1=1600207&r2=1600208&view=diff ============================================================================== --- incubator/celix/trunk/utils/private/src/linked_list.c (original) +++ incubator/celix/trunk/utils/private/src/linked_list.c Wed Jun 4 13:46:18 2014 @@ -56,16 +56,15 @@ UTILS_EXPORT celix_status_t linkedList_d linked_list_entry_pt current = NULL; linked_list_entry_pt next = NULL; - current = list->header; - list->header = NULL; - list->size = 0; + current = list->header->next; - while (current != NULL) { + while (current != list->header) { next = current->next; free(current); current = next; } + free(list->header); free(list); return status;