Slacker News Slacker News logo featuring a lazy sloth with a folded newspaper hat
  • top
  • new
  • show
  • ask
  • jobs
Library

Comment by EPWN3D

7 days ago

Yeah here's a trivial one.

void *__free p = NULL;

func(&p); // func zeroes p to claim ownership

// end of scope, p is NULL, nothing happens // if func was not called, p is freed

0 comments

EPWN3D

Reply

No comments yet

Contribute on Hacker News ↗

Slacker News

Product

  • API Reference
  • Hacker News RSS
  • Source on GitHub

Community

  • Support Ukraine
  • Equal Justice Initiative
  • GiveWell Charities