summaryrefslogtreecommitdiff
path: root/examples/py-machine-learning/keras-autoencoder.py
diff options
context:
space:
mode:
authorgoriy <goriy@users.noreply.github.com>2015-10-24 23:32:51 +0300
committergoriy <goriy@users.noreply.github.com>2015-10-24 23:32:51 +0300
commite709651a20f3b32c5cca9e3ca29c6b0b43bbb4d8 (patch)
tree0b527ce56aabd7fcdbe911c4c467fbb2be8abf67 /examples/py-machine-learning/keras-autoencoder.py
parent0c2d60b8e7820857fe14dfd113a90c94b2f18611 (diff)
small fix of jsondump example for cases of realloc failures
When realloc() function fails it returns NULL pointer. But old data pointer remains valid in such a case. It's a mistake to use old data pointer to store new pointer returned by realloc. In case of realloc failure, pointer is overwritten with NULL value, but old used memory remains unreferenced and could not be even freed anymore. Such mistakes could lead to memory leaks.
Diffstat (limited to 'examples/py-machine-learning/keras-autoencoder.py')
0 files changed, 0 insertions, 0 deletions