use strdup, simplify free

Bug #1262994 reported by Seth Arnold
6
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

Revision history for this message
Seth Arnold (seth-arnold) wrote :
Revision history for this message
Daniel Holbach (dholbach) wrote :

It looks like the code in question does not exist anymore.

Changed in ubuntu-sdk-tutorials:
status: New → Invalid
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.