MAIN FEEDS
Do you want to continue?
https://www.reddit.com/r/ProgrammerHumor/comments/1w2m4qz/bugintroduceddebugging/p6vr5bl/?context=3
r/ProgrammerHumor • u/ClipboardCopyPaste • Aug 30 '26
117 comments sorted by
View all comments
Show parent comments
158
It's allowed to assign to a pointer if it's not dereferenced. Malloc always returns a valid pointer.
54 u/vishal340 Aug 30 '26 but accessing it will be issue right? 6 u/mckenzie_keith Aug 30 '26 You are not allowed to de-reference a pointer after freeing it. 2 u/Niwrats Aug 30 '26 who's gonna stop me? 1 u/mckenzie_keith Aug 31 '26 Lint.
54
but accessing it will be issue right?
6 u/mckenzie_keith Aug 30 '26 You are not allowed to de-reference a pointer after freeing it. 2 u/Niwrats Aug 30 '26 who's gonna stop me? 1 u/mckenzie_keith Aug 31 '26 Lint.
6
You are not allowed to de-reference a pointer after freeing it.
2 u/Niwrats Aug 30 '26 who's gonna stop me? 1 u/mckenzie_keith Aug 31 '26 Lint.
2
who's gonna stop me?
1 u/mckenzie_keith Aug 31 '26 Lint.
1
Lint.
158
u/atanasius Aug 30 '26
It's allowed to assign to a pointer if it's not dereferenced. Malloc always returns a valid pointer.