patch 8.0.0356: leaking memory when setting 'ttytype'

Problem:    Leaking memory when setting 'ttytype'.
Solution:   Get free_oldval from the right option entry.
diff --git a/src/option.c b/src/option.c
index 48a8048..4ba4363 100644
--- a/src/option.c
+++ b/src/option.c
@@ -5936,6 +5936,7 @@
 	    /* Both 'term' and 'ttytype' point to T_NAME, only set the
 	     * P_ALLOCED flag on 'term'. */
 	    opt_idx = findoption((char_u *)"term");
+	    free_oldval = (options[opt_idx].flags & P_ALLOCED);
 	}
     }