![Dynamic generation of rather complex JSON - error of memory allocation for a string - Development Platforms - PlatformIO Community Dynamic generation of rather complex JSON - error of memory allocation for a string - Development Platforms - PlatformIO Community](https://community.platformio.org/uploads/default/original/2X/1/1f4591492ed97004edd7c659368c52f676ef4702.png)
Dynamic generation of rather complex JSON - error of memory allocation for a string - Development Platforms - PlatformIO Community
![c - Function that returns dynamically allocated string works once, then returns garbage values on subsequent calls (after free has been called) - Stack Overflow c - Function that returns dynamically allocated string works once, then returns garbage values on subsequent calls (after free has been called) - Stack Overflow](https://i.stack.imgur.com/RPvMj.png)
c - Function that returns dynamically allocated string works once, then returns garbage values on subsequent calls (after free has been called) - Stack Overflow
![c - I want to store a character string in block of memory space created by malloc and then modify the same space to store a much larger string - Stack Overflow c - I want to store a character string in block of memory space created by malloc and then modify the same space to store a much larger string - Stack Overflow](https://i.stack.imgur.com/8aUwR.png)
c - I want to store a character string in block of memory space created by malloc and then modify the same space to store a much larger string - Stack Overflow
![hi! from what I understand(first pic) , we couldn't write *y = 13; because we did not use malloc to allocate memory to y before trying to pass 13 into the memory hi! from what I understand(first pic) , we couldn't write *y = 13; because we did not use malloc to allocate memory to y before trying to pass 13 into the memory](https://preview.redd.it/g25y7yb3ui771.jpg?width=640&crop=smart&auto=webp&s=2c4fb8225ac28c61bfd2db14498be3b8a42b62e2)