Deutsch English Français Italiano |
<v0mr1e$1bfnq$2@dont-email.me> View for Bookmarking (what is this?) Look up another Usenet article |
Path: ...!uucp.uio.no!fnord.no!news1.firedrake.org!nntp.terraraq.uk!news.gegeweb.eu!gegeweb.org!eternal-september.org!feeder3.eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail From: Lawrence D'Oliveiro <ldo@nz.invalid> Newsgroups: comp.lang.c Subject: Re: avoiding strdup() Date: Mon, 29 Apr 2024 00:53:02 -0000 (UTC) Organization: A noiseless patient Spider Lines: 12 Message-ID: <v0mr1e$1bfnq$2@dont-email.me> References: <us0brl$246bf$1@dont-email.me> <pan$4fc39$61bdfbef$3ca9a71a$af842694@invalid.invalid> <87y1ayj6hs.fsf_-_@bsb.me.uk> <pan$e9f7e$d6f7a386$31c353e8$a08c13cf@invalid.invalid> <usc845$10v6e$1@dont-email.me> <pan$89aca$33d2df8c$9e2c232f$d767db40@invalid.invalid> <ushea7$28prq$2@dont-email.me> <ushnkb$1rnlb$4@dont-email.me> <87r0gizzuo.fsf@nosuchdomain.example.com> <20240310101101.00001fd4@yahoo.com> <20240310100715.866@kylheku.com> <ifnHN.386274$vFZa.250421@fx13.iad> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Injection-Date: Mon, 29 Apr 2024 02:53:02 +0200 (CEST) Injection-Info: dont-email.me; posting-host="04215bbbe15e1cd8ac94ba1cee5d62b8"; logging-data="1425146"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1/LP1C6p3XDcxv7bqBSHrqT" User-Agent: Pan/0.155 (Kherson; fc5a80b8) Cancel-Lock: sha1:buTtV/isNkqRos0aOYN8wS3+2mY= Bytes: 1829 On Sun, 10 Mar 2024 18:47:42 GMT, Scott Lurndal wrote: > I've seen a lot of open source code > that uses strdup without checking for failure and frequently > "forgetting" to free the result. I was looking at the systemd source code the other day, and came across a lot of this sort of thing: _cleanup_free_ char *link = NULL; Now, what do you suppose “_cleanup_free_” does?