* details.
*
* You should have received a copy of the GNU Lesser General Public
- * License along with these librararies and programs; if not, write
+ * License along with these libraries and programs; if not, write
* to the Free Software Foundation, Inc., 51 Franklin Street, Fifth
* Floor, Boston, MA 02110-1301 USA
*/
list_str = strdup("");
}
- if ((buf = (char *) malloc(strlen(list_str) + 1)) == NULL)
+ if ((buf = (char *) malloc(strlen(list_str) + 1)) == NULL) {
+ free((void *) list_str);
return;
+ }
strcpy(buf, (char *)list_str);
if((token = (char *) strtok(buf, " ")))