use strdup, simplify free
Bug #1262994 reported by
Seth Arnold
This bug affects 1 person
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Ubuntu SDK Tutorials |
Invalid
|
Undecided
|
Unassigned |
Bug Description
When I read the scopes tutorial I thought it was complicated and thought
some of the extra work that was being done manually contributed to the
complication.
This untested patch removes the non-NULL checks before free(3) calls which
isn't necessary and also replaces manual memory allocation with strdup()
when duplicating many strings. I believe the end result is easier to read.
Please consider applying this patch to the tutorial.
Thanks
To post a comment you must log in.
It looks like the code in question does not exist anymore.