\r
if (mystr == NULL)\r
return NULL;\r
- if ((retstr = malloc (strlen (mystr) + 1)) == NULL)\r
+ if ((retstr = malloc(strlen (mystr) + 1)) == NULL)\r
return NULL;\r
\r
// Make a copy and find the relevant characters.\r
}\r
\r
// Return the modified string.\r
-\r
+ free(mystr);\r
return retstr;\r
}\r
\r
+\r
+\r
//from http://quiz.geeksforgeeks.org/c-program-cyclically-rotate-array-one/\r
void rotateR(byte *arr, byte n)\r
{\r