push_back and pop_back semantically mean something completely unrelated to a LIFO stack to me, by how they operate in multiple STL containers. What they really should probably say are push_top, and pop_top, if you don't just name them push and pop for the way most people recognize the stack operations...
My first question to you is why do you NOT properly free this memory block you've allocated for the stack operations on the heap? My second question is why do you use malloc() in C++? You should be using the new and delete keywords.
This is a good example of the reason why dynamic memory allocation is typically avoided in C++ at high level. The workings of your class are a basic example of a semi-working stack datatype, but it also introduces the possibility of memory leaks. You should have a defined destructor which takes care of freeing up that memory you allocate with malloc() in this case.