Message ID | 8624037f-834c-4908-3268-543112d35051@gmail.com |
---|---|
State | Dropped |
Headers |
Return-Path: <location-bounces@lists.ipfire.org> Received: from mail01.ipfire.org (mail01.haj.ipfire.org [172.28.1.202]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-384) server-digest SHA384 client-signature ECDSA (P-384) client-digest SHA384) (Client CN "mail01.haj.ipfire.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by web04.haj.ipfire.org (Postfix) with ESMTPS id 4CJDNV2Dkzz3wgb for <patchwork@web04.haj.ipfire.org>; Sat, 24 Oct 2020 08:12:26 +0000 (UTC) Received: from mail02.haj.ipfire.org (mail02.haj.ipfire.org [172.28.1.201]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-384) client-signature ECDSA (P-384)) (Client CN "mail02.haj.ipfire.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mail01.ipfire.org (Postfix) with ESMTPS id 4CJDNT6WBPz11K; Sat, 24 Oct 2020 08:12:25 +0000 (UTC) Received: from mail02.haj.ipfire.org (localhost [127.0.0.1]) by mail02.haj.ipfire.org (Postfix) with ESMTP id 4CJDNT4Gxkz2xbW; Sat, 24 Oct 2020 08:12:25 +0000 (UTC) Received: from mail01.ipfire.org (mail01.haj.ipfire.org [172.28.1.202]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-384) server-digest SHA384 client-signature ECDSA (P-384) client-digest SHA384) (Client CN "mail01.haj.ipfire.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mail02.haj.ipfire.org (Postfix) with ESMTPS id 4CJDNR5snRz2xff for <location@lists.ipfire.org>; Sat, 24 Oct 2020 08:12:23 +0000 (UTC) Received: from mail-lj1-x229.google.com (mail-lj1-x229.google.com [IPv6:2a00:1450:4864:20::229]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-384) server-digest SHA384 client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "smtp.gmail.com", Issuer "GTS CA 1O1" (verified OK)) by mail01.ipfire.org (Postfix) with ESMTPS id 4CJDNQ4lxVzgl for <location@lists.ipfire.org>; Sat, 24 Oct 2020 08:12:22 +0000 (UTC) Received: by mail-lj1-x229.google.com with SMTP id 134so3034036ljj.3 for <location@lists.ipfire.org>; Sat, 24 Oct 2020 01:12:22 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:subject:to:message-id:date:user-agent:mime-version :content-language:content-transfer-encoding; bh=guv9EhYJ/++ZGcGPS/5FVILRUbF0azl34m4E1pE+iPc=; b=rYd3v5t8il5XIzpSCVPyldZAU9RGq0eWvHjgVM7QL9R0F+2KMx/MZrp5q7jJMVNmkd U406fBKt1I7S7cLjQAldDohCjE1k3gwH2e28TwNKnlq4yReUPFK4SU5WzU9GeRQSsKdL 8hMuCk6pNYQcU01cvnAMmA26yZcOZk8b22neFdusEO7jwqQX4d+VjtqovmRz7rm6GYC/ sGSJ5bK5dzeT3hu4nJ1FUdZRadKPmRyIIsumLxdLFyR9ODWXERuhjC2QM9dcekJd/9/E V7+VhxwzgIRfjshx8qBPbCERHdOBqsAjlztkJeMaUXez8zN9XlXZwGdvhcwfSXSOOgya NzMQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:subject:to:message-id:date:user-agent :mime-version:content-language:content-transfer-encoding; bh=guv9EhYJ/++ZGcGPS/5FVILRUbF0azl34m4E1pE+iPc=; b=JPd7qfaRAbvsTedWNN6PkQZ8KZkE75h2CsHY/bze/geG7yceahaK6wktP+hOzwLL/l Y5poF62mFNJFTr0lmQR+7B9xvdZnbFoevlLXMQvEwweaqRfe0FTmpqB2Ck5SL3YQCv1H S7uMO3C/fBeSq0E0VQ9KDyx/iOvDOOy6kQy3zSXTKrNZ3WAZdxLJHJvlmzA1l2BoJ6c/ Dm6hiaRKRIRRZ6uwGJaMCJr2Oq54IphJ0JF03Mrq/U5mSvt9iyJEL5kPO+y3u2pTEQir ebR4xa8sxdBSYj0+Lr7NfM9Ch/7zVvL7pIDvfgKRY8RX5wxTcmsdImb+ZNltObiBC5W0 jP2g== X-Gm-Message-State: AOAM533vHAMZgwWaQudw6oWTrUvUjdjb3Tsk04KET9mSNmzicylvnIjd eWfQmfYVLa3wrObyFoHI0Fkmnt6ToOYp/w== X-Google-Smtp-Source: ABdhPJzjJ5dbFQJiOtXZXDXxQUP/iaBqoP/A+oXhGz0CCR/Iis8c2AZFv0+ZvIvVC/CuunupxfTjDQ== X-Received: by 2002:a2e:9215:: with SMTP id k21mr2156414ljg.163.1603527133536; Sat, 24 Oct 2020 01:12:13 -0700 (PDT) Received: from ?IPv6:2001:4665:2d49:1:1d28:8d8a:33e6:7efe? ([2001:4665:2d49:1:1d28:8d8a:33e6:7efe]) by smtp.gmail.com with ESMTPSA id a11sm365141lfi.187.2020.10.24.01.12.12 for <location@lists.ipfire.org> (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Sat, 24 Oct 2020 01:12:12 -0700 (PDT) From: Gisle Vanem <gisle.vanem@gmail.com> Subject: Mem-leaks in 'test-as.c' To: location@lists.ipfire.org Message-ID: <8624037f-834c-4908-3268-543112d35051@gmail.com> Date: Sat, 24 Oct 2020 10:12:11 +0200 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:60.0) Gecko/20100101 Thunderbird/60.9.0 MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-GB Content-Transfer-Encoding: 7bit ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=lists.ipfire.org; s=202003rsa; t=1603527142; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding:dkim-signature; bh=guv9EhYJ/++ZGcGPS/5FVILRUbF0azl34m4E1pE+iPc=; b=UhqDbJfhkWKLnomCPXd+QdWKy2YkSN1vifrO22wekUBIWtU/D45tqvhqMlIhKR2IPAOrcp GLf36gkaL/HB+hH5sfEUlq1XYhufnCTXfHl1ixIrxQEuKH1S1uYb5oU+ajdCol1MXdbeGH yu32ETqAGttoIvatGaP59fkjAdBDoJH5m5MiVXrQkrHfCvSGK/c4rjii71F1FSdb9VcgnA 7/O48je4ahFWOczl7mmqm9Q/GbJI6cfDGh2TzpgLr/wYw83rJpRQ5sbXNy0KmLazosxkth ZCuCr8Hm884o8n/tsr3ByF9Cr+2vSH6CFrB9j+Abet5NQGOltnOyee4+yoPjhA== ARC-Seal: i=1; s=202003rsa; d=lists.ipfire.org; t=1603527142; a=rsa-sha256; cv=none; b=X+mGAt5NiGJnsa9tZat4y6xq37ls0A4GvbCA4gokOIxSoKoajd0PJ7sM6h5AO87im7UpgO nPA5mpXRn4VuKkJ8ArabmUl3MY+xIO9YRosgyL05ow5SrAAHIQi5QcAzRaUvGZekqV2G73 ezV3J1OS0aaXYIiN3HfYiKhqCI38EOZ6b4nwbL4Jla23RBi+Jypur56Y6+2G56oDA5UGfV +UfG8k4lHFH4aSyDZ9PfUZjp1U3l4pENAnCsp1dcVuvuJPsbjqSX/Ym4C2tWzwE2yNyj8U dAvJpyTldItc70u+M6gkW97kuEOjYZ3a4oSnsCZfJeTqVEx6+L8hCdG9XqbHfQ== ARC-Authentication-Results: i=1; mail01.ipfire.org; dkim=pass header.d=gmail.com header.s=20161025 header.b=rYd3v5t8; spf=pass (mail01.ipfire.org: domain of gislevanem@gmail.com designates 2a00:1450:4864:20::229 as permitted sender) smtp.mailfrom=gislevanem@gmail.com X-Rspamd-Queue-Id: 4CJDNQ4lxVzgl X-Spamd-Result: default: False [-1.51 / 11.00]; RCVD_VIA_SMTP_AUTH(0.00)[]; FREEMAIL_FROM(0.00)[gmail.com]; IP_REPUTATION_HAM(-0.51)[asn: 15169(-0.25), country: US(-0.00), ip: 2a00:1450:4864:20::229(0.00)]; TO_DN_NONE(0.00)[]; ARC_SIGNED(0.00)[lists.ipfire.org:s=202003rsa:i=1]; R_SPF_ALLOW(-0.20)[+ip6:2a00:1450:4000::/36]; RCVD_COUNT_THREE(0.00)[3]; DKIM_TRACE(0.00)[gmail.com:+]; DMARC_POLICY_ALLOW(-0.50)[gmail.com,none]; FROM_EQ_ENVFROM(0.00)[]; MIME_TRACE(0.00)[0:+]; FREEMAIL_ENVFROM(0.00)[gmail.com]; ASN(0.00)[asn:15169, ipnet:2a00:1450::/32, country:US]; MID_RHS_MATCH_FROM(0.00)[]; TAGGED_FROM(0.00)[]; DWL_DNSWL_NONE(0.00)[gmail.com:dkim]; ARC_NA(0.00)[]; R_DKIM_ALLOW(-0.20)[gmail.com:s=20161025]; BAYES_HAM(-0.00)[35.65%]; FROM_HAS_DN(0.00)[]; TO_MATCH_ENVRCPT_ALL(0.00)[]; MIME_GOOD(-0.10)[text/plain]; PREVIOUSLY_DELIVERED(0.00)[location@lists.ipfire.org]; RCPT_COUNT_ONE(0.00)[1]; RCVD_IN_DNSWL_NONE(0.00)[2a00:1450:4864:20::229:from]; RCVD_TLS_ALL(0.00)[] Authentication-Results: mail01.ipfire.org; dkim=pass header.d=gmail.com header.s=20161025 header.b=rYd3v5t8; dmarc=pass (policy=none) header.from=gmail.com; spf=pass (mail01.ipfire.org: domain of gislevanem@gmail.com designates 2a00:1450:4864:20::229 as permitted sender) smtp.mailfrom=gislevanem@gmail.com X-Rspamd-Server: mail01.haj.ipfire.org X-BeenThere: location@lists.ipfire.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: <location.lists.ipfire.org> List-Unsubscribe: <https://lists.ipfire.org/mailman/options/location>, <mailto:location-request@lists.ipfire.org?subject=unsubscribe> List-Archive: <http://lists.ipfire.org/pipermail/location/> List-Post: <mailto:location@lists.ipfire.org> List-Help: <mailto:location-request@lists.ipfire.org?subject=help> List-Subscribe: <https://lists.ipfire.org/mailman/listinfo/location>, <mailto:location-request@lists.ipfire.org?subject=subscribe> Errors-To: location-bounces@lists.ipfire.org Sender: "Location" <location-bounces@lists.ipfire.org> |
Series |
Mem-leaks in 'test-as.c'
|
|
Commit Message
Gisle Vanem
Oct. 24, 2020, 8:12 a.m. UTC
Michael Tremer wrote: > First thing to know is that we use reference counting for all objects. > So every pointer that refers to an object has to decrement > the counter when it no longer needs it. The object will be automatically > cleaned up after nothing needs it any more. In 'test-as.c', I get a huge amount of leaks in MSVC debug-mode. Since 'loc_database_enumerator_unref()' just unreferences itself and not the 'as' (working as designed?) IMHO it should be: With that patch, no reported leaks. Could be leaks in 'libloc' itself too; haven't checked yet.
--- a/test-as.c 2020-10-19 17:35:01 +++ b/test-as.c 2020-10-24 10:01:57 @@ -111,12 +111,17 @@ while (as) { printf("Found AS%d: %s\n", loc_as_get_number(as), loc_as_get_name(as)); - err = loc_database_enumerator_next_as(enumerator, &as); + struct loc_as* as_next; + + err = loc_database_enumerator_next_as(enumerator, &as_next); if (err) { fprintf(stderr, "Could not enumerate next AS\n"); exit(EXIT_FAILURE); } + loc_as_unref(as); + as = as_next; } loc_database_enumerator_unref(enumerator);