title: Clear local variables
body: <p>When I call a function that receive arguments, the own function clear the pushed data with "add esp, n" and the local variables with POPs, OK.</p>
  
  <p>When I call a function that receive pointers (address) or when I call a syscall that receive pointers... How these functions/syscalls clear the parameters in the stack? The data pointed can be in the the stack or in the heap.
  For example:</p>
  
  <pre><code>push edx         ; NULL    ;
  push 0x68732f6e  ; "n/sh"  ; "//bin/sh\0"
  push 0x69622f2f  ; "//bi"  ;
  mov ebx, esp     ; ebx = &amp;"//bin/sh\0"
  push edx         ; NULL
  push ebx         ; &amp;"//bin/sh\0"
  mov ecx, esp     ; ecx = args[&amp;"//bin/sh\0", NULL]
  push edx         ; NULL
  mov edx, esp     ; edx = envp[NULL]
  
  int 0x80
  </code></pre>
  
  <p>Source example that need execute RET:</p>
  
  <pre><code>BITS 32
  
  section .text
  global _start
  _start:
      call Foo
  
      ; exit
      mov ebx, 0
      mov eax, 1
      int 0x80
  
  Foo:
      push ebp
      mov ebp, esp
  
      ; Create the socket file descriptor
      ; int socket(int domain, int type, int protocol)
  
      mov al, 102  ; __NR_socketcall
      mov bl, 1    ; __NR_socketcall type (socket)
  
      ; socket parameters
      sub esp, 8    ; sin_zero
      push 6        ; IPPROTO_TCP
      push 1        ; SOCK_STREAM
      push 2        ; AF_INET
      mov ecx, esp  ; &amp;uargs
  
      int 0x80  ; socket(AF_INET, SOCK_STREAM, IPPROTO_TCP)
  
      ; add esp, 0
      mov esp, ebp
      pop ebp
      ret
  </code></pre>